-
Bug
-
Resolution: Done
-
Major
-
4.4.0.Final
-
None
When one calls orderBefore() on two separately imported nodes, the subsequent call of session.nodeExists() fails on non-existing siblings of these nodes:
java.lang.NullPointerException
at org.modeshape.jcr.cache.document.SessionChildReferences.getChild(SessionChildReferences.java:107)
at org.modeshape.jcr.cache.document.AbstractChildReferences.getChild(AbstractChildReferences.java:50)
at org.modeshape.jcr.JcrSession.cachedNode(JcrSession.java:622)
at org.modeshape.jcr.JcrSession.node(JcrSession.java:656)
at org.modeshape.jcr.JcrSession.node(JcrSession.java:675)
at org.modeshape.jcr.JcrSession.nodeExists(JcrSession.java:949)
Calling save() immediately after orderBefore() works as a workaround, but one we can't use in our (client) code.
The code runs fine on Jackrabbit. The patch reproducing the issue is attached.