jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florent Guillaume ...@nuxeo.com>
Subject Versioning bug with restore and transactions
Date Thu, 07 Sep 2006 16:25:36 GMT
I'm posting here because at the moment I can't login to Jira (seems  
my account was reset or something, and "forgotten password" seems to  
send email by pigeon carrier).

I have a versioning bug in the presence of transactions. It's hard to  
reproduce and seems memory-layout dependent.
At the moment I only have a jython testcase, see below. This is with  
a svn checkout from today.
If developers can't mirror that in a pure java testcase I'll try to  
do that myself, but I wanted to get the info out asap.
Basically the program does create a node and subnode and do some  
checkins, checkouts, restore, modifications, in successive transactions.

The program log and stack trace is:

start 1
node a44e6556-728d-4970-a635-5ff7d2a38f2f
commit 1
start 2
commit 2
start 3
commit 3
javax.transaction.xa.XAException
         at org.apache.jackrabbit.core.TransactionContext.prepare 
(TransactionContext.java:138)
         at org.apache.jackrabbit.core.XASessionImpl.commit 
(XASessionImpl.java:313)
         File "debug1.py", line 126, in doit
         File "debug1.py", line 159, in ?
Caused by: org.apache.jackrabbit.core.TransactionException: Unable to  
prepare transaction.
         at  
org.apache.jackrabbit.core.state.XAItemStateManager.prepare 
(XAItemStateManager.java:159)
         at org.apache.jackrabbit.core.TransactionContext.prepare 
(TransactionContext.java:121)
         ... 22 more
Caused by: org.apache.jackrabbit.core.state.StaleItemStateException:  
a44e6556-728d-4970-a635-5ff7d2a38f2f/{http://www.jcp.org/jcr/1.0} 
isCheckedOut has been modified externally
         at org.apache.jackrabbit.core.state.SharedItemStateManager 
$Update.begin(SharedItemStateManager.java:546)
         at  
org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate 
(SharedItemStateManager.java:717)
         at  
org.apache.jackrabbit.core.state.XAItemStateManager.prepare 
(XAItemStateManager.java:151)
         ... 23 more
javax.transaction.xa.XAException: javax.transaction.xa.XAException

Note that the mentionned property (here, isCheckedOut) has changed  
when I was cutting down on the program size to get a simpler  
testcase. It's not necessarily a "system" property, and sometimes it  
was property of the subnode created under the main node.

Test program is attached.
I'm using java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112)
Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing)

Any feedback welcome.

Florent


Mime
View raw message