Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
1.1
-
None
-
None
Description
This happens on current trunk.
When running the following code on the attached jackrabbit repository,
(sorry, Jython code, I trust the conversion to Java is trivial):
from javax.jcr import SimpleCredentials
from org.apache.jackrabbit.core import TransientRepository
uuid = "83f6e473-3fe2-4584-9570-4e18a0cd6688"
repoconf = "var/jackrabbit.xml"
repopath = "var/jackrabbit"
credentials = SimpleCredentials("username", "password")
repository = TransientRepository(repoconf, repopath)
session = repository.login(credentials, "default")
root = session.getRootNode()
node = session.getNodeByUUID(uuid)
node.remove()
root.save()
I get the following error:
org.apache.jackrabbit.core.state.NoSuchItemStateException: c147b847-8ba5-4fe9-a890-481586476510
at org.apache.jackrabbit.core.state.SharedItemStateManager.getNodeReferences(SharedItemStateManager.java:307)
at org.apache.jackrabbit.core.state.SharedItemStateManager.updateReferences(SharedItemStateManager.java:1046)
at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:484)
at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:687)
at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:717)
at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:316)
at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:323)
at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:292)
at org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:258)
at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1209)
...
javax.jcr.RepositoryException: javax.jcr.RepositoryException: /: unable to update item.: c147b847-8ba5-4fe9-a890-481586476510: c147b847-8ba5-4fe9-a890-481586476510
The uuid I'm trying to delete is that of a document at path
/workspaces/ecm:children/subfolder/ecm:children/ghtgh
The uuid mentioned in the error is the one of its version history.