You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Marth (JIRA)" <ji...@apache.org> on 2013/11/07 15:55:17 UTC
[jira] [Updated] (OAK-1118) Removing and readding mix:versionable
fails if node is referenceable
[ https://issues.apache.org/jira/browse/OAK-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Marth updated OAK-1118:
-------------------------------
Fix Version/s: 0.15
> Removing and readding mix:versionable fails if node is referenceable
> --------------------------------------------------------------------
>
> Key: OAK-1118
> URL: https://issues.apache.org/jira/browse/OAK-1118
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core, jcr
> Reporter: angela
> Fix For: 0.15
>
>
> removing mix:versionable from a referenceable node will fail with the following exception:
> {quote}
> javax.jcr.nodetype.ConstraintViolationException: OakConstraint0022: /testdata[nt:unstructured, mix:referenceable, mix:versionable]: Mandatory property jcr:predecessors can not be removed
> at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:220)
> at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:207)
> at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.newRepositoryException(SessionDelegate.java:471)
> at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:334)
> at org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.perform(SessionImpl.java:399)
> at org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.perform(SessionImpl.java:396)
> at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:128)
> at org.apache.jackrabbit.oak.jcr.session.SessionImpl.perform(SessionImpl.java:117)
> at org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:396)
> at org.apache.jackrabbit.oak.jcr.nodetype.MixinTest.testRemoveAddMixVersionable2(MixinTest.java:134)
> 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:464)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
> Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0022: /testdata[nt:unstructured, mix:referenceable, mix:versionable]: Mandatory property jcr:predecessors can not be removed
> {quote}
> the test:
> {code}
> @Test
> public void testRemoveAddMixVersionable() throws Exception {
> testRootNode.addMixin(mixReferenceable);
> testRootNode.addMixin(mixVersionable);
> superuser.save();
> String vhId = testRootNode.getVersionHistory().getUUID();
> testRootNode.removeMixin(mixVersionable);
> testRootNode.addMixin(mixVersionable);
> superuser.save();
> assertFalse(vhId.equals(testRootNode.getVersionHistory().getUUID()));
> }
> {code}
> i am not totally sure what is going wrong here as works if the node is only mix:versionable....
--
This message was sent by Atlassian JIRA
(v6.1#6144)