jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rauschenbach <dav...@imap.cc>
Subject JCR2SPI Node.remove causes ConstraintVE("ChangeLog not self-contained")
Date Fri, 14 Sep 2007 03:19:23 GMT
My removeNodeTest doesn't seem to want to work through jcr2spi. When I
remove a node and save its parent, jcr2spi ChangeLog throws
ConstraintViolationException("ChangeLog is not self contained"), because:

1. opStates (returned by op.getAffectedItemStates()) contains two entries:

1a. Status.EXISTING_REMOVED of the node being removed
1b. Status.EXISTING_MODIFIED of its parent, the root node.


2. affectedStates contains only one entry:

2a. Status.EXISTING_MODIFIED of the root node

Any idea why the affectedStates var would only contain the one entry, not
both? Maybe some metadata drives that?

I'm using a web service SPI I implemented, in conjunction with the jcr2spi
and spi2jcr bridges, coupled with a back-end Jackrabbit in-memory
filesystem. So there's always the possibility that node or property SPI
calls inject errors and cause this downstream problem.

Here's my invoking code;

> final String NODE = "block";
> Session serverSession = login(repository, creds);
> Node serverRootNode = serverSession.getRootNode();
> assertFalse(serverRootNode.hasNode(NODE));
> Node serverNode = serverRootNode.addNode(NODE, "nt:folder");
> serverSession.save();
> assertTrue(serverRootNode.hasNode(NODE));
> Session clientSession = login(clientRepository, creds);
> Node clientRootNode = clientSession.getRootNode();
> Node clientNode = clientRootNode.getNode(NODE);
> clientNode.remove();
> clientRootNode.save();  <== THROWS "ChangeLog is not self contained"
> serverSession.refresh(false);
> assertFalse(serverRootNode.hasNode(NODE));


View raw message