jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florent Guillaume ...@nuxeo.com>
Subject Re: Versioning bug with restore and transactions
Date Mon, 11 Sep 2006 13:20:44 GMT
Tobias Bocanegra wrote:
> you can't use the xaresource directly

Why? I'm using an API that's legitimate and public.

> you need to create a user transaction.

I'm the sole user of Jackrabbit and the transactions here. Behind the scene, 
a user transaction does exactly what I do: xaresource.start() with the 
proper arguments, do some work then end() it and commit() it. Jackrabbit's 
test/java/org/apache/jackrabbit/core/UserTransactionImpl.java is pretty simple.

> and you can use the transaction only once.

I've updated my code to use different xid instances for each transaction, 
and it still crashes. Updated jython code attached.

Thanks for looking into this. I'll open a JIRA issue now that I've received 
my updated password.

Florent


> regards, toby
> 
> On 9/7/06, Florent Guillaume <fg@nuxeo.com> wrote:
>> 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
>>
>>
>>
>>
>> -- 
>> Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
>> +33 1 40 33 71 59   http://nuxeo.com   fg@nuxeo.com
>>
>>
>>
>>
>>
>>
> 
> 


-- 
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg@nuxeo.com

Mime
View raw message