[ 
https://issues.apache.org/jira/browse/OAK-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13598702#comment-13598702
 ] 

Alex Parvulescu commented on OAK-686:
-------------------------------------

I'm unable to reproduce this failure (the test passes by default on my setup).

bq. if the respective node is not referenceable, then the correct exception 
(InvalidItemStateException) is thrown by the ConflictValidator hook.
I'm not sure I get it, isn't that baked into the test? if the node is not 
referenceable the test would throw a NotExecutableException [0].


[0] 
http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SessionUUIDTest.java?view=markup#l67

                
> Save on node moved in other session throws wrong exception 
> -----------------------------------------------------------
>
>                 Key: OAK-686
>                 URL: https://issues.apache.org/jira/browse/OAK-686
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, jcr
>            Reporter: Michael Dürig
>            Priority: Minor
>
> {{org.apache.jackrabbit.test.api.SessionUUIDTest#testSaveMovedRefNode}} 
> demonstrates the problem:
> The call to {{testSession.save()}} should throw an 
> {{InvalidItemStateException}} since the underlying item has been moved by 
> another session. However, it throws a generic {{RepositoryException}} caused 
> by a failed commit. The commit fails in 
> {{org.apache.jackrabbit.oak.plugins.index.p2.strategy.ContentMirrorStoreStrategy#insert}},
>  which finds a uniqueness violation on the uuid.
> Full stack trace 
> {code}
> javax.jcr.RepositoryException: 
> org.apache.jackrabbit.oak.api.CommitFailedException: Uniqueness constraint 
> violated for key 52b4bed5-2ede-4a42-8e9a-ee0866c12d6d
>       at 
> org.apache.jackrabbit.oak.api.CommitFailedException.throwRepositoryException(CommitFailedException.java:68)
>       at 
> org.apache.jackrabbit.oak.jcr.SessionDelegate.save(SessionDelegate.java:258)
>       at org.apache.jackrabbit.oak.jcr.SessionImpl.save(SessionImpl.java:277)
>       at 
> org.apache.jackrabbit.test.api.SessionUUIDTest.testSaveMovedRefNode(SessionUUIDTest.java:147)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at 
> org.apache.jackrabbit.test.AbstractJCRTest.run(AbstractJCRTest.java:456)
>       at 
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
>       at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
>       at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: Uniqueness 
> constraint violated for key 52b4bed5-2ede-4a42-8e9a-ee0866c12d6d
>       at 
> org.apache.jackrabbit.oak.plugins.index.p2.strategy.ContentMirrorStoreStrategy.insert(ContentMirrorStoreStrategy.java:135)
>       at 
> org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexUpdate.apply(Property2IndexUpdate.java:164)
>       at 
> org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexDiff.apply(Property2IndexDiff.java:272)
>       at 
> org.apache.jackrabbit.oak.plugins.index.IndexHookManager.apply(IndexHookManager.java:72)
>       at 
> org.apache.jackrabbit.oak.plugins.index.IndexHookManager.processCommit(IndexHookManager.java:62)
>       at 
> org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:59)
>       at 
> org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:59)
>       at 
> org.apache.jackrabbit.oak.kernel.KernelNodeStoreBranch.merge(KernelNodeStoreBranch.java:145)
>       at org.apache.jackrabbit.oak.core.RootImpl$2.run(RootImpl.java:260)
>       at org.apache.jackrabbit.oak.core.RootImpl$2.run(RootImpl.java:256)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:337)
>       at org.apache.jackrabbit.oak.core.RootImpl.commit(RootImpl.java:255)
>       at 
> org.apache.jackrabbit.oak.jcr.SessionDelegate.save(SessionDelegate.java:255)
>       ... 27 more
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to