6 Replies Latest reply: Sep 7, 2011 2:34 PM by Randall Hauch RSS

exception in call to save() after move()

Jonathan Fields Novice

I'm getting the following exception in Session.save() after a simple call to Session.move("/path/to/a", "/path/to/b") where /path/to/b does not already exist. This happens in a federated repository (infinispan and file system). It occurs for both infinispan and file system nodes. Interestingly, the operation does move the node regardless of the exception:

 

Caused by: javax.jcr.RepositoryException: java.lang.IllegalArgumentException: The actual location of </{}infinispan/{}node1 && [{http://www.modeshape.org/1.0}uuid = 535660a4-0f8b-49fc-ae5f-ea7ae61ce02e]> is not equal to the current location of </{}infinispan && [{http://www.modeshape.org/1.0}uuid = cafebabe-cafe-babe-cafe-babecafebabe]>

    at org.modeshape.jcr.SessionCache.save(SessionCache.java:480)

    at org.modeshape.jcr.JcrSession.save(JcrSession.java:1309)

    at com.montanesolutions.mcr.component.NodeAction.renameNode(NodeAction.java:126)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)

    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)

    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)

    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)

    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

    at org.jboss.seam.core.EventInterceptor.aroundInvoke(EventInterceptor.java:52)

    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)

    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)

    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)

    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)

    at com.montanesolutions.mcr.component.NodeAction_$$_javassist_seam_7.renameNode(NodeAction_$$_javassist_seam_7.java)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)

    at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348)

    at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)

    at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)

    at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)

    at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)

    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)

    ... 54 more

Caused by: org.modeshape.graph.connector.RepositorySourceException: java.lang.IllegalArgumentException: The actual location of </{}infinispan/{}node1 && [{http://www.modeshape.org/1.0}uuid = 535660a4-0f8b-49fc-ae5f-ea7ae61ce02e]> is not equal to the current location of </{}infinispan && [{http://www.modeshape.org/1.0}uuid = cafebabe-cafe-babe-cafe-babecafebabe]>

    at org.modeshape.graph.session.GraphSession.save(GraphSession.java:1052)

    at org.modeshape.jcr.SessionCache.save(SessionCache.java:474)

    ... 86 more

Caused by: java.lang.IllegalArgumentException: The actual location of </{}infinispan/{}node1 && [{http://www.modeshape.org/1.0}uuid = 535660a4-0f8b-49fc-ae5f-ea7ae61ce02e]> is not equal to the current location of </{}infinispan && [{http://www.modeshape.org/1.0}uuid = cafebabe-cafe-babe-cafe-babecafebabe]>

    at org.modeshape.graph.request.MoveBranchRequest.setActualLocations(MoveBranchRequest.java:245)

    at org.modeshape.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:1109)

    at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:279)

    at org.modeshape.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:195)

    at org.modeshape.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:145)

    at org.modeshape.graph.connector.federation.FederatedRepositoryConnection.execute(FederatedRepositoryConnection.java:225)

    at org.modeshape.graph.connector.RepositoryConnectionPool$ConnectionWrapper.execute(RepositoryConnectionPool.java:1129)

    at org.modeshape.graph.request.CompositeRequestChannel$2.call(CompositeRequestChannel.java:193)

    at org.modeshape.graph.request.CompositeRequestChannel$2.call(CompositeRequestChannel.java:183)

    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

    at java.util.concurrent.FutureTask.run(FutureTask.java:138)

    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

    ... 1 more

  • 1. Re: exception in call to save() after move()
    Jonathan Fields Novice

    Also after this exception is thrown, it seems that any subsequent JCR calls fail with the following exception. I have to stop and start Modeshape to get it working again.

     

    Caused by: java.lang.IllegalStateException: Unable to add more requests to a batch of graph requests that has already been executed

        at org.modeshape.graph.Graph$Batch.assertNotExecuted(Graph.java:3184)

        at org.modeshape.graph.Graph$Batch.delete(Graph.java:3819)

        at org.modeshape.graph.session.GraphSession.recordDelete(GraphSession.java:1199)

        at org.modeshape.graph.session.GraphSession$Node.destroy(GraphSession.java:2516)

        at org.modeshape.jcr.SessionCache$NodeEditor.destroy(SessionCache.java:1863)

        at org.modeshape.jcr.JcrNode.doDestroy(JcrNode.java:135)

        at org.modeshape.jcr.JcrNode.doRemove(JcrNode.java:127)

        at org.modeshape.jcr.AbstractJcrNode.removeShare(AbstractJcrNode.java:2383)

        at org.modeshape.jcr.AbstractJcrNode.remove(AbstractJcrNode.java:2426)

        at com.montanesolutions.mcr.component.NodeAction.deleteNode(NodeAction.java:141)

  • 2. Re: exception in call to save() after move()
    Randall Hauch Master

    Can you please log this issue, too?

  • 3. Re: exception in call to save() after move()
    Jonathan Fields Novice

    Will do. When I encounter an issue like this, is it preferred to create a discussion first, or log a JIRA straight away....

  • 5. Re: exception in call to save() after move()
    Randall Hauch Master

    It's difficult to say. Usually, with exceptions such as these, it's perfectly fine to log an issue if there isn't a similar issue already. Just be sure to include as much detail as possible (it's often better to include more than you think is necessary).

     

    Other times, it's much less clear what's going on, and a forum discussion is one way we can perhaps tease out the necessary information. Of course, we can have discussions via the JIRA, too.

     

    In short, there's no right or wrong way.

     

    BTW, while we could just as easily log the issue, we frequently are missing some of the missing information. Plus, it's great to have the issue logged by the people that find the issues.

  • 6. Re: exception in call to save() after move()
    Randall Hauch Master

    MODE-1256 has been fixed and merged into the 'master' branch, and will appear in the 2.6.0.Final release.

     

    Thanks, Jonathon, for finding and reporting these errors!