[ https://issues.apache.org/jira/browse/JCR-3422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453723#comment-13453723 ]
Claus Köll commented on JCR-3422: --------------------------------- The root cause is the StaleItemStateException. This means that someone else has already saved on the same node and it could not be merged. This is not a bug. > Jackrabbit throwing StaleItemStateException on XA transaction commit > -------------------------------------------------------------------- > > Key: JCR-3422 > URL: https://issues.apache.org/jira/browse/JCR-3422 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core, transactions > Affects Versions: 2.4.1, 2.4.2, 2.4.3 > Environment: Linux (RHEL 6.3), JDK 1.7, Glassfish 3.1.2 > Reporter: Amit Parikh > Priority: Blocker > > The issue occurs when concurrent XA transaction commits are happening. > On XA transaction commit call from MDB (Message Driven Bean) container > following exception is thrown by Jackrabbit > javax.transaction.xa.XAException > at > org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:160) > at > org.apache.jackrabbit.core.XASessionImpl.prepare(XASessionImpl.java:310) > at > org.apache.jackrabbit.jca.TransactionBoundXAResource.prepare(TransactionBoundXAResource.java:78) > at > com.sun.enterprise.resource.XAResourceWrapper.prepare(XAResourceWrapper.java:111) > at com.sun.jts.jtsxa.OTSResourceImpl.prepare(OTSResourceImpl.java:273) > at > com.sun.jts.CosTransactions.RegisteredResources.distributePrepare(RegisteredResources.java:518) > at > com.sun.jts.CosTransactions.TopCoordinator.prepare(TopCoordinator.java:1846) > at > com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:357) > at > com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:250) > at > com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:633) > at > com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:332) > at > com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.commitDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:174) > at > com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:861) > at > com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5136) > at > com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4901) > at > com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1211) > at > com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1186) > at > com.sun.ejb.containers.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:86) > at > com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:143) > at $Proxy264.afterDelivery(Unknown Source) > at > com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:328) > at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114) > at > com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497) > at > com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540) > Caused by: org.apache.jackrabbit.core.TransactionException: Unable to prepare > transaction. > at > org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:169) > at > org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:143) > ... 23 more > Caused by: org.apache.jackrabbit.core.state.StaleItemStateException: > 781c1637-120a-4b6b-8916-d2cb232b9848/{http://www.hitachi-hta.com/iframe/1.0}lastModified > has been modified externally > at > org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:673) > at > org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1467) > at > org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:163) > ... 24 more -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira