Details
-
Bug
-
Resolution: Workaround exists
-
Neutral
-
None
-
5.5
-
None
-
None
Description
javax.jcr.InvalidItemStateException can sometimes occur when calling node.remove() (and most likely also when calling session.removeItem(absPath)).
This happens when node has versions, and has pending changes (changes that weren't saved) before calling node.remove() (session.removeItem(absPath)). It's due to removing mixin mgnl:hasVersions from the original node. This call happens when whole version history for the original node is removed.
Unfortunately removing the mixin happens in another session than removing the actual node - so using current (not system) session should resolve the issue.
Workaround is easy : save node before removing it.
Checklists
Acceptance criteria