that's very strange. does this also happen if you connect jcr2spi directly with
spi2jcr without your intermediary layer?
regards
marcel
David Rauschenbach wrote:
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.
whereas
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));
Thanks