You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Francesco Mari <ma...@gmail.com> on 2015/04/09 16:48:16 UTC

OakConstraint0030 when generating jcr:uuid properties

Hi all,

I experience an OakConstraint0030 error when creating  an
nt:unstructured node with the mix:referenceable mixin using the
ContentRepository API. Assuming the availability of a ContentSession
instance, I perform the following operations:

- Create a Tree under "/test".
- Set the "jcr:primaryType" property to "nt:unstructured" with type NAME.
- Set the "jcr:mixinTypes" property to "[mix:referenceable]" with type NAMES.
- Generate auto-created properties using TreeUtil.autoCreateItems().
- Commit.

When committing the operations above, the following exception is raised:

org.apache.jackrabbit.oak.api.CommitFailedException:
OakConstraint0030: Uniqueness constraint violated at path [/] for one
of the property in [jcr:uuid] having value
7dcbadbf-6615-4152-a90b-57d0e36182fd
at org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.leave(PropertyIndexEditor.java:303)
~[classes/:na]
at org.apache.jackrabbit.oak.plugins.index.IndexUpdate.leave(IndexUpdate.java:220)
~[classes/:na]
at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(VisibleEditor.java:63)
~[classes/:na]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:56)
~[classes/:na]
at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54)
~[classes/:na]
at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)
~[classes/:na]
at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)
~[classes/:na]
at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore$MemoryNodeStoreBranch.merge(MemoryNodeStore.java:283)
~[classes/:na]
at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore.merge(MemoryNodeStore.java:128)
~[classes/:na]
at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:247)
~[classes/:na]
at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:258)
~[classes/:na]
at org.apache.jackrabbit.oak.remote.content.ContentRemoteSession.commit(ContentRemoteSession.java:331)
~[classes/:na]
... 25 common frames omitted

I'm aware of OAK-2246, in fact I am testing my code against the
current trunk (as of this morning). I'm trying to debug this issue
since a while now, but I have to admit that all of my hopes were in
the resolution of OAK-2246. Does somebody have any hints about this?