Hi,

Jackrabbit 2.4.3

How do I remove a VersionHistory which has no versions (other than 
jcr:rootVersion)?

I have a process that iterates over version histories that checks to see if the 
base version has been deleted. If it has, it removes all the versions which in 
turn removes the VersionHistory. That all works fine.

I have a number of version histories which only have jcr:rootVersion and 
jcr:versionLabels. If I try to call versionHistory.remove() it throws a 
ConstraintViolationException, as I kind of guessed it would. I thought maybe I 
could checkin() the base version to create version 1.0, then I could remove 
that, but when I do a session.getNodeByIdentifier() it throws a 
ItemNotFoundException. I get the identifier from VersionHistory.getName(). 
There are no other processes/apps running that might be interfering.

How do I tidy up these?

Thanks,

Rob.

Reply via email to