Expand my Community achievements bar.

crx2oak producing CommitFailedException: OakConstraint0030: Uniqueness constraint violated at path ...

Avatar

Level 3

Hi,

We're using crx2oak to do blue-green deployments. As a baseline I'm trying the parameter --copy-versions=false to see how much time/space can by gained by excluding versions. However when doing this, in the migrated repository on startup, I consistently get this error:

31.07.2017 13:21:12.855 *ERROR* [FelixStartLevel] com.adobe.granite.repository.impl.SlingRepositoryManager start: Uncaught Throwable trying to access Repository, calling stopRepository()

java.lang.RuntimeException: org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0030: Uniqueness constraint violated at path [/] for one of the property in [jcr:uuid] having value 294de355-7d9d-30b3-92d8-a1e6aab028cf

at org.apache.jackrabbit.oak.spi.lifecycle.OakInitializer.initialize(OakInitializer.java:64)

at org.apache.jackrabbit.oak.Oak.createContentRepository(Oak.java:567)

at com.adobe.granite.repository.impl.SlingRepositoryManager.createRepository(SlingRepositoryManager.java:428)

at com.adobe.granite.repository.impl.SlingRepositoryManager.acquireRepository(SlingRepositoryManager.java:299)

at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.start(AbstractSlingRepositoryManager.java:304)

at com.adobe.granite.repository.impl.SlingRepositoryManager.activate(SlingRepositoryManager.java:276)

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.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)

at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)

at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)

at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)

at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)

at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)

at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)

at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:847)

at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:814)

at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)

at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:950)

at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:911)

at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)

at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)

at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)

at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)

at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)

at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:120)

at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:987)

at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)

at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)

at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4547)

at org.apache.felix.framework.Felix.registerService(Felix.java:3521)

at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)

at org.apache.sling.commons.threads.impl.Activator.start(Activator.java:55)

at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)

at org.apache.felix.framework.Felix.activateBundle(Felix.java:2223)

at org.apache.felix.framework.Felix.startBundle(Felix.java:2141)

at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1368)

at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)

at java.lang.Thread.run(Thread.java:748)

Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0030: Uniqueness constraint violated at path [/] for one of the property in [jcr:uuid] having value 294de355-7d9d-30b3-92d8-a1e6aab028cf

at org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.leave(PropertyIndexEditor.java:295)

at org.apache.jackrabbit.oak.plugins.index.IndexUpdate.leave(IndexUpdate.java:252)

at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(VisibleEditor.java:63)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:56)

at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.prepare(SegmentNodeStore.java:458)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.optimisticMerge(SegmentNodeStore.java:489)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.execute(SegmentNodeStore.java:545)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore.merge(SegmentNodeStore.java:208)

at org.apache.jackrabbit.oak.spi.state.ProxyNodeStore.merge(ProxyNodeStore.java:43)

at org.apache.jackrabbit.oak.spi.lifecycle.OakInitializer.initialize(OakInitializer.java:62)

... 40 common frames omitted

It surprises me that NOT copying versions causes this. On the other hand, I've seen that copying some versions fixes this problem. I'll continue trying options, but any tips or guidance about what's happening would be very useful.

Thx,

Federico

PS: aem 6.1 SP2

PS2: curiously enough the mentioned uuid belongs to the anonymous user at /home/users/G/GDBwO...

7 Replies

Avatar

Level 9

Hi,

What is the exact command you are using to migrate?

Thanks,

Avatar

Level 3

Hi,

java  -jar ${UPGRADE_JAR} --mmap --copy-versions=false --copy-orphaned-versions=false --include-paths=/content,/etc/tags,/home,/var/<removed>/widgets,/jcr:system/rep:namespaces,/jcr:system/rep:permissionStore,/etc/workflow/instances,/var/eventing/scheduled-jobs,/var/eventing/distribution --merge-paths=/var/audit ${SRC} ${DEST}

Avatar

Employee Advisor

That's an interesting case. Can you post it to an Apache Oak mailing list? Please include your Oak version as well.

Apache Jackrabbit - Mailing Lists

Avatar

Level 10

If you are still have issues - please open a ticket.

Avatar

Level 3

Yeah, that's a good idea. For other people's reference it's ticket 1435759.

Avatar

Level 3

Update: simply excluding the anonymous user seems to have fixed the problem. It's a dynamic path though.