-
Bug
-
Resolution: Done
-
Blocker
-
5.0.0.Final
-
None
0) Create node and add child node to it
Then in another transaction and in brand new session:
1) Load child node;
2) Update parent node;
3) Call session.save();
4) Remove child node;
5) Call session.save() and you will get exception.
This issue is really similar to https://issues.jboss.org/browse/MODE-2608, but fix for that issue didn't resolve this one. I'm still able to reproduce this issue using test, please see attachment.
Exception:
javax.jcr.InvalidItemStateException: This session tried to save changes to node with key 'Cannot locate child node: dbb11dd7505d64c117ec3f-18ae-4eb2-9d65-d762209e3b01 within parent: dbb11dd7505d642bdf0eb7-7e89-4a39-b3bd-287b6ebdf6fd', but it was removed by another session.
at org.modeshape.jcr.JcrSession.save(JcrSession.java:1171)
Caused by: org.modeshape.jcr.cache.NodeNotFoundInParentException: Cannot locate child node: dbb11dd7505d64c117ec3f-18ae-4eb2-9d65-d762209e3b01 within parent: dbb11dd7505d642bdf0eb7-7e89-4a39-b3bd-287b6ebdf6fd
at org.modeshape.jcr.cache.document.LazyCachedNode.parentReferenceToSelf(LazyCachedNode.java:238)
at org.modeshape.jcr.cache.document.LazyCachedNode.getSegment(LazyCachedNode.java:282)
at org.modeshape.jcr.cache.document.LazyCachedNode.getPath(LazyCachedNode.java:308)
at org.modeshape.jcr.cache.PathCache.getPath(PathCache.java:41)
at org.modeshape.jcr.cache.document.WritableSessionCache.persistChanges(WritableSessionCache.java:1002)
at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:716)
at org.modeshape.jcr.JcrSession.save(JcrSession.java:1162)
... 31 more