jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1633) When node is created and locked in same transaction, exception is thrown
Date Wed, 17 Sep 2008 12:01:44 GMT

    [ https://issues.apache.org/jira/browse/JCR-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631750#action_12631750
] 

Jukka Zitting commented on JCR-1633:
------------------------------------

See also the duplicate JCR-1702 that has an alternative patch and related commentary by Claus
Köll.

> When node is created and locked in same transaction, exception is thrown
> ------------------------------------------------------------------------
>
>                 Key: JCR-1633
>                 URL: https://issues.apache.org/jira/browse/JCR-1633
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core, locks, transactions
>    Affects Versions: core 1.4.3, core 1.4.4
>         Environment: Jackrabbit Core 1.4.4, Jencks 2.0, Springmodules 0.8a, Jackrabbit
JCA 1.4
>            Reporter: Roman Puchkovskiy
>         Attachments: test-create-and-lock-in-same-tx.zip, XALockTest.java
>
>
> Following code fails when executed inside an XA transaction:
> Node n = session.getRootNode().addNode("n");
> n.addMixin("mix:lockable");
> session.save();
> Lock lock = n.lock(false, false);
> Stacktrace is
> Caused by: javax.transaction.xa.XAException
> 	at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:155)
> 	at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:337)
> 	at org.apache.jackrabbit.jca.TransactionBoundXAResource.commit(TransactionBoundXAResource.java:39)
> 	at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.commit(WrapperNamedXAResource.java:47)
> 	at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:301)
> 	... 32 more
> Caused by: org.apache.jackrabbit.core.TransactionException: Unable to update.
> 	at org.apache.jackrabbit.core.lock.XAEnvironment.prepare(XAEnvironment.java:275)
> 	at org.apache.jackrabbit.core.lock.XALockManager.prepare(XALockManager.java:245)
> 	at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:138)
> 	... 36 more
> Caused by: javax.jcr.ItemNotFoundException: failed to build path of 48fb59d8-ac77-4b9f-8b53-9f2492dca5e5:
48fb59d8-ac77-4b9f-8b53-9f2492dca5e5: 48fb59d8-ac77-4b9f-8b53-9f2492dca5e5
> 	at org.apache.jackrabbit.core.HierarchyManagerImpl.getPath(HierarchyManagerImpl.java:407)
> 	at org.apache.jackrabbit.core.CachingHierarchyManager.getPath(CachingHierarchyManager.java:272)
> 	at org.apache.jackrabbit.core.lock.LockManagerImpl.getPath(LockManagerImpl.java:651)
> 	at org.apache.jackrabbit.core.lock.LockManagerImpl.internalLock(LockManagerImpl.java:276)
> 	at org.apache.jackrabbit.core.lock.XAEnvironment$LockInfo.update(XAEnvironment.java:409)
> 	at org.apache.jackrabbit.core.lock.XAEnvironment.prepare(XAEnvironment.java:273)
> 	... 38 more
> Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: 48fb59d8-ac77-4b9f-8b53-9f2492dca5e5
> 	at org.apache.jackrabbit.core.state.SessionItemStateManager.getItemState(SessionItemStateManager.java:189)
> 	at org.apache.jackrabbit.core.HierarchyManagerImpl.getItemState(HierarchyManagerImpl.java:188)
> 	at org.apache.jackrabbit.core.HierarchyManagerImpl.getPath(HierarchyManagerImpl.java:402)
> 	... 43 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message