You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Marcin Cenkier <ma...@cognifide.com> on 2005/09/22 15:50:50 UTC

Bug in JR transaction implementation (XASession)

Hi,
I have big problems with transactions using XASession. The following 
code runs ok without transactions, but when transactions are used, it fails:

Node versionableParent = 
session.getRootNode().getNode(PARENT_NODE_NAME); //mix:versionable

versionableParent.checkout();

Node node = versionableParent.addNode("NODE");

node.addMixin("mix:versionable");

versionableParent.save();

node.checkin();                    <=========(*)

versionableParent.checkin();

log.info("node.isCheckedOut()" + node.isCheckedOut());

In transaction, (*) line doesn't make the node check in (it stays 
checked out) and trying to commit the transaction causes:

15:41:14,434 ERROR (TransactionalItemStateManager.java:114) - 
org.apache.jackrabbit.core.state.NoSuchItemStateException: 
31f78b39-6422-4ec8-b41e-2571b6807b05/{http://www.jcp.org/jcr/1.0}isCheckedOut
java.lang.Exception: Cannot commit transaction.
[...]
Caused by: org.apache.jackrabbit.core.state.TransactionException: Unable 
to commit transaction.: 
31f78b39-6422-4ec8-b41e-2571b6807b05/{http://www.jcp.org/jcr/1.0}isCheckedOut
[...]
Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: 
31f78b39-6422-4ec8-b41e-2571b6807b05/{http://www.jcp.org/jcr/1.0}isCheckedOut

When I removed (*) line, transaction commits well, but the node stays 
checked out...

Any ideas?

PS.
I can send you a simple code that shows the problem if you want.

-- 
Best Regards,                              Senior developer at Cognifide 

Marcin Cenkier                                         www.cognifide.com

Re: Bug in JR transaction implementation (XASession)

Posted by Marcin Cenkier <ma...@cognifide.com>.
sorry, i thought i've menaged to cancel this message before it was sent 
(i didn't want to send the code to the group).

-- 
Best Regards,                              Senior developer at Cognifide
Marcin Cenkier                                         www.cognifide.com