You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Grant Overby <gr...@gmail.com> on 2013/08/02 20:45:55 UTC

jcr2sp - Exception when Deleting Parent of Deleted but unsaved Child

javax.jcr.RepositoryException: Cannot transiently remove an ItemState with
status EXISTING_REMOVED
        at
org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntryImpl.transientRemove(HierarchyEntryImpl.java:414)
        at
org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntryImpl.transientRemove(PropertyEntryImpl.java:35)
        at
org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.transientRemove(NodeEntryImpl.java:220)
        at
org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.removeItemState(SessionItemStateManager.java:489)
        at
org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.visit(SessionItemStateManager.java:302)
        at
org.apache.jackrabbit.jcr2spi.operation.Remove.accept(Remove.java:67)
        at
org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.execute(SessionItemStateManager.java:215)
        at org.apache.jackrabbit.jcr2spi.ItemImpl.remove(ItemImpl.java:307)


HierarchyEntryImpl.transientRemove() sets the ItemState status to
EXISTING_REMOVED. If the ItemState status is already in EXISTING_REMOVED,
can a no-operation safely occur?

I propose adding the following case to the switch statement in
HierarchyEntryImpl.transientRemove()

case Status.EXISTING_REMOVED: break;