Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
Flagged
Description
I try to run import examples both via REST-service and via groovy updater scripts. Both of them fail with javax.jcr.ItemExistsException: This node already exists
INFO 2018-08-08 18:14:02 Executing updater Example_Import_Asset_and_Image_Set_Content INFO 2018-08-08 18:14:02 No path set. Skipping path visitor. INFO 2018-08-08 18:14:02 Loading nodes to update INFO 2018-08-08 18:14:02 Finished loading 1 nodes to update ERROR 2018-08-08 18:14:02 Failed to process record. org.onehippo.forge.content.exim.core.ContentMigrationException: org.onehippo.forge.content.pojo.binder.ContentNodeBindingException: javax.jcr.ItemExistsException: This node already exists: /content/gallery/contenteximdemo/banners/banner-1.jpg/banner-1.jpg/hippogallery:thumbnail at org.onehippo.forge.content.exim.core.impl.DefaultBinaryImportTask.createOrUpdateBinaryFromContentNode(DefaultBinaryImportTask.java:137) at org.onehippo.forge.content.exim.core.BinaryImportTask$createOrUpdateBinaryFromContentNode$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:149) at org.hippoecm.frontend.plugins.cms.admin.updater.ImportingAssetOrImageSetFromFileUpdateVisitor$_doUpdate_closure1.doCall(updater:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at groovy.lang.Closure.call(Closure.java:414) at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachWithIndex(DefaultGroovyMethods.java:1920) at org.codehaus.groovy.runtime.dgm$171.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at org.hippoecm.frontend.plugins.cms.admin.updater.ImportingAssetOrImageSetFromFileUpdateVisitor.doUpdate(updater:74) at org.onehippo.repository.update.UpdaterExecutor.executeUpdater(UpdaterExecutor.java:278) at org.onehippo.repository.update.UpdaterExecutor.runQueryVisitor(UpdaterExecutor.java:224) at org.onehippo.repository.update.UpdaterExecutor.execute(UpdaterExecutor.java:111) at org.onehippo.repository.update.UpdaterExecutionModule$ExecuteUpdatersTask.executeUpdater(UpdaterExecutionModule.java:179) at org.onehippo.repository.update.UpdaterExecutionModule$ExecuteUpdatersTask.executeUpdatersInQueue(UpdaterExecutionModule.java:169) at org.onehippo.repository.update.UpdaterExecutionModule$ExecuteUpdatersTask.run(UpdaterExecutionModule.java:147) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.onehippo.forge.content.pojo.binder.ContentNodeBindingException: javax.jcr.ItemExistsException: This node already exists: /content/gallery/contenteximdemo/banners/banner-1.jpg/banner-1.jpg/hippogallery:thumbnail at org.onehippo.forge.content.pojo.binder.jcr.DefaultJcrContentNodeBinder.bind(DefaultJcrContentNodeBinder.java:118) at org.onehippo.forge.content.pojo.binder.jcr.DefaultJcrContentNodeBinder.bind(DefaultJcrContentNodeBinder.java:51) at org.onehippo.forge.content.exim.core.impl.DefaultBinaryImportTask.updateBinaryHandleAndVariantNodeFromBinaryVariantContentNode(DefaultBinaryImportTask.java:171) at org.onehippo.forge.content.exim.core.impl.DefaultBinaryImportTask.createOrUpdateBinaryFromContentNode(DefaultBinaryImportTask.java:127) ... 31 more Caused by: javax.jcr.ItemExistsException: This node already exists: /content/gallery/contenteximdemo/banners/banner-1.jpg/banner-1.jpg/hippogallery:thumbnail at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1299) at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:111) at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:37) at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91) at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:1818) at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1778) at org.hippoecm.repository.decorating.NodeDecorator.addNode(NodeDecorator.java:85) at org.onehippo.forge.content.pojo.binder.jcr.DefaultJcrContentNodeBinder.addSubNodes(DefaultJcrContentNodeBinder.java:217) at org.onehippo.forge.content.pojo.binder.jcr.DefaultJcrContentNodeBinder.bind(DefaultJcrContentNodeBinder.java:115) ... 34 more INFO 2018-08-08 18:14:02 =============================================================================================================== Execution Summary: --------------------------------------------------------------------------------------------------------------- Total: 1, Processed: 1, Suceeded: 0, Failed: 1, Duration: 24ms --------------------------------------------------------------------------------------------------------------- Details (in CSV format): --------------------------------------------------------------------------------------------------------------- SEQ,PROCESSED,SUCCEEDED,ID,PATH,TYPE,ATTRIBUTES,ERROR 1,true,false,9e440e6d-e93a-4d5f-913b-9c3b0867c812,/content/gallery/contenteximdemo/banners/banner-1.jpg,hippogallery:imageset,{file=/java/hippo/forge/content-export-import/demo/target/tomcat8x/temp/content-exim-demo/bindata/content/gallery/contenteximdemo/banners/banner-1.jpg.json},org.onehippo.forge.content.exim.core.ContentMigrationException: org.onehippo.forge.content.pojo.binder.ContentNodeBindingException: javax.jcr.ItemExistsException: This node already exists: /content/gallery/contenteximdemo/banners/banner-1.jpg/banner-1.jpg/hippogallery:thumbnail =============================================================================================================== INFO 2018-08-08 18:14:02 Finished executing updater Example_Import_Asset_and_Image_Set_Content INFO 2018-08-08 18:14:02 Visited 2 nodes in total INFO 2018-08-08 18:14:02 Updated: 0 INFO 2018-08-08 18:14:02 Skipped: 1 INFO 2018-08-08 18:14:02 Failed: 1 DEBUG 2018-08-08 18:14:02 saving all pending changes currently recorded in this batch unit.
OK, let's try to change the exported file banner-1.jpg.json to banner-666-to-import.jpg.json and all values banner-1.jpg to banner-666-to-import.jpg in the file:
Same exception is thrown:
INFO 2018-08-08 18:00:44 Executing updater Example_Import_Asset_and_Image_Set_Content INFO 2018-08-08 18:00:44 No path set. Skipping path visitor. INFO 2018-08-08 18:00:44 Loading nodes to update INFO 2018-08-08 18:00:44 Finished loading 1 nodes to update ERROR 2018-08-08 18:00:44 Failed to process record. org.onehippo.forge.content.exim.core.ContentMigrationException: org.onehippo.forge.content.pojo.binder.ContentNodeBindingException: javax.jcr.ItemExistsException: This node already exists: /content/gallery/contenteximdemo/banners/banner-666-to-import.jpg/banner-666-to-import.jpg/hippogallery:thumbnail at org.onehippo.forge.content.exim.core.impl.DefaultBinaryImportTask.createOrUpdateBinaryFromContentNode(DefaultBinaryImportTask.java:137) at org.onehippo.forge.content.exim.core.BinaryImportTask$createOrUpdateBinaryFromContentNode$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:149) at org.hippoecm.frontend.plugins.cms.admin.updater.ImportingAssetOrImageSetFromFileUpdateVisitor$_doUpdate_closure1.doCall(updater:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at groovy.lang.Closure.call(Closure.java:414) at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachWithIndex(DefaultGroovyMethods.java:1920) at org.codehaus.groovy.runtime.dgm$171.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at org.hippoecm.frontend.plugins.cms.admin.updater.ImportingAssetOrImageSetFromFileUpdateVisitor.doUpdate(updater:74) at org.onehippo.repository.update.UpdaterExecutor.executeUpdater(UpdaterExecutor.java:278) at org.onehippo.repository.update.UpdaterExecutor.runQueryVisitor(UpdaterExecutor.java:224) at org.onehippo.repository.update.UpdaterExecutor.execute(UpdaterExecutor.java:111) at org.onehippo.repository.update.UpdaterExecutionModule$ExecuteUpdatersTask.executeUpdater(UpdaterExecutionModule.java:179) at org.onehippo.repository.update.UpdaterExecutionModule$ExecuteUpdatersTask.executeUpdatersInQueue(UpdaterExecutionModule.java:169) at org.onehippo.repository.update.UpdaterExecutionModule$ExecuteUpdatersTask.run(UpdaterExecutionModule.java:147) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.onehippo.forge.content.pojo.binder.ContentNodeBindingException: javax.jcr.ItemExistsException: This node already exists: /content/gallery/contenteximdemo/banners/banner-666-to-import.jpg/banner-666-to-import.jpg/hippogallery:thumbnail at org.onehippo.forge.content.pojo.binder.jcr.DefaultJcrContentNodeBinder.bind(DefaultJcrContentNodeBinder.java:118) at org.onehippo.forge.content.pojo.binder.jcr.DefaultJcrContentNodeBinder.bind(DefaultJcrContentNodeBinder.java:51) at org.onehippo.forge.content.exim.core.impl.DefaultBinaryImportTask.updateBinaryHandleAndVariantNodeFromBinaryVariantContentNode(DefaultBinaryImportTask.java:171) at org.onehippo.forge.content.exim.core.impl.DefaultBinaryImportTask.createOrUpdateBinaryFromContentNode(DefaultBinaryImportTask.java:127) ... 31 more Caused by: javax.jcr.ItemExistsException: This node already exists: /content/gallery/contenteximdemo/banners/banner-666-to-import.jpg/banner-666-to-import.jpg/hippogallery:thumbnail at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1299) at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:111) at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:37) at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91) at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:1818) at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1778) at org.hippoecm.repository.decorating.NodeDecorator.addNode(NodeDecorator.java:85) at org.onehippo.forge.content.pojo.binder.jcr.DefaultJcrContentNodeBinder.addSubNodes(DefaultJcrContentNodeBinder.java:217) at org.onehippo.forge.content.pojo.binder.jcr.DefaultJcrContentNodeBinder.bind(DefaultJcrContentNodeBinder.java:115) ... 34 more INFO 2018-08-08 18:00:45 =============================================================================================================== Execution Summary: --------------------------------------------------------------------------------------------------------------- Total: 1, Processed: 1, Suceeded: 0, Failed: 1, Duration: 166ms --------------------------------------------------------------------------------------------------------------- Details (in CSV format): --------------------------------------------------------------------------------------------------------------- SEQ,PROCESSED,SUCCEEDED,ID,PATH,TYPE,ATTRIBUTES,ERROR 1,true,false,b0a99d5a-c9d2-4c00-94f9-d906b4248fbc,/content/gallery/contenteximdemo/banners/banner-666-to-import.jpg,hippogallery:imageset,{file=/java/hippo/forge/content-export-import/demo/target/tomcat8x/temp/content-exim-demo/bindata/content/gallery/contenteximdemo/banners/banner-666-to-import.jpg.json},org.onehippo.forge.content.exim.core.ContentMigrationException: org.onehippo.forge.content.pojo.binder.ContentNodeBindingException: javax.jcr.ItemExistsException: This node already exists: /content/gallery/contenteximdemo/banners/banner-666-to-import.jpg/banner-666-to-import.jpg/hippogallery:thumbnail ===============================================================================================================
Attachments
Issue Links
- is awaited by
-
FORGE-218 [Content-EXIM] Tag 2.3.0
- Closed