[MGNLRES-110] InstallBinaryResourcesTask does not overwrite existing ressources Created: 22/Apr/14 Updated: 29/Mar/22 Resolved: 18/Jul/14 |
|
| Status: | Closed |
| Project: | Magnolia Resources Module |
| Component/s: | updates |
| Affects Version/s: | None |
| Fix Version/s: | 2.2.5, 2.3.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Jan Christian Haddorp | Assignee: | Eric Hechinger |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | support | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Date of First Response: | |||||
| Visible to: |
ameyer, Roland Aust, Werner Rauch
|
||||
| Team: | |||||
| Description |
|
The new InstallBinaryResourcesTask class does not overwrite existing ressources. The old (now deprecated) InstallResourcesTask class does an overwrite by default. The missing overwrite ability causes problems when being used in update task. It would be possible to remove nodes (see RemoveNodeTask/RemoveNodesTask) before installing again. But compared to the old class this is additional effort or not really necessary coding. |
| Comments |
| Comment by Roman Kovařík [ 16/May/14 ] |
|
Cannot reproduce with Resources 2.3-SNAPSHOT. |
| Comment by Roman Kovařík [ 18/Jul/14 ] |
|
Reproducible when using new tasks in ThemeVersionHandler, see 2014-07-18 08:03:25,811 ERROR info.magnolia.module.InstallContextImpl : > Could not install or update theme-pop module. Task 'Install theme' failed. (ItemExistsException: This node already exists: /templating-kit/themes/pop/img/bgs/quote/binary) info.magnolia.module.delta.TaskExecutionException: Can't install resource [/templating-kit/themes/pop/img/bgs/quote.png] at info.magnolia.module.resources.setup.InstallBinaryResourceTask.execute(InstallBinaryResourceTask.java:106) at info.magnolia.module.resources.setup.InstallBinaryResourcesTask.doExecute(InstallBinaryResourcesTask.java:75) at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:57) at info.magnolia.module.templatingkit.setup.ThemeInstallTask.execute(ThemeInstallTask.java:113) at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:514) at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:496) at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:274) at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:414) at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:1) at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:385) at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:268) at info.magnolia.module.ui.ModuleManagerWebUI$2.run(ModuleManagerWebUI.java:124) at java.lang.Thread.run(Thread.java:680) Caused by: javax.jcr.ItemExistsException: This node already exists: /templating-kit/themes/pop/img/bgs/quote/binary at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1293) |
| Comment by Philip Mundt [ 18/Jul/14 ] |
|
Happened during update of Magnolia 4.5.12 to 5.2.6-SNAPSHOT. |