Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't commit because the transaction is in aborted state

 
Deepak Chenani
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are getting the following exception while processing messages by our application deployed on the JBoss 4.2.3 Application Server.
This has occurred only once till now but we are trying to analyse the root cause of this exception. Due to this error we have observed loss of the message processed by the thread.

Following is the stack trace of the exception:

16:20:30,135 WARN [loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.preparefailed] [com.arjuna.ats.internal.jta.resources.arjunacore.preparefailed] XAResourceRecord.prepare - prepare failed with exception java.lang.IllegalMonitorStateException
16:20:30,135 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_36] - BasicAction.End() - prepare phase of action-id a0208f7:288a:50f91d3a:1babc8 failed.
16:20:30,136 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_38] - Action Aborting
16:20:30,142 WARN [loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.rollbackxaerror] [com.arjuna.ats.internal.jta.resources.arjunacore.rollbackxaerror] XAResourceRecord.rollback - xa error XAException.XAER_NOTA
16:20:30,143 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_54] - Top-level abort of action a0208f7:288a:50f91d3a:1babc8 received TwoPhaseOutcome.FINISH_ERROR from <ClassName:RecordType.JTA_RECORD>
16:20:30,188 ERROR [LogInterceptor] RuntimeException in method: public abstract boolean com.j2fe.workflow.interfaces.FlowControllerBeanLocal.activateToken(java.lang.String,com.j2fe.workflow.runtime.RuntimeContext,java.util.Map):
com.j2fe.remoting.SafeRemoteException: org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
at com.j2fe.workflow.ejb.FlowControllerBean.activateToken(FlowControllerBean.java:863)
at sun.reflect.GeneratedMethodAccessor401.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
at org.jboss.ejb.Container.invoke(Container.java:960)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
at $Proxy69.activateToken(Unknown Source)
at com.j2fe.workflow.ejb.WorkflowWork.execute(WorkflowWork.java:161)
at com.j2fe.workflow.ejb.WorkflowWork.run(WorkflowWork.java:151)
at com.j2fe.clustering.WorkReplicationItem.run(WorkReplicationItem.java:111)
at com.j2fe.clustering.WorkReplication$WorkerThread.run(WorkReplication.java:677)
at com.j2fe.security.JBossSecurityPropagation.execute(JBossSecurityPropagation.java:149)
at com.j2fe.util.ExecutorRunnableAdapter.run(ExecutorRunnableAdapter.java:27)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:713)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:435)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:126)
at com.j2fe.workflow.ejb.FlowControllerInternalImpl.executeTransaction(FlowControllerInternalImpl.java:1111)
at com.j2fe.workflow.ejb.FlowControllerInternalImpl.startTransactional(FlowControllerInternalImpl.java:1336)
at com.j2fe.workflow.ejb.FlowControllerBean.activateToken(FlowControllerBean.java:941)
at com.j2fe.workflow.ejb.FlowControllerBean.activateToken(FlowControllerBean.java:855)
... 29 more
Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
at org.springframework.transaction.jta.UserTransactionAdapter.commit(UserTransactionAdapter.java:69)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:710)
... 35 more
 
Deepak Chenani
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following is the error we see in our application log file:

2013-01-22 16:20:30,143 [WorkManager(2)-451112][com.j2fe.workflow.ejb.FlowControllerInternalImpl] ERROR - Unexpected Exception caught
org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
at org.springframework.transaction.jta.UserTransactionAdapter.commit(UserTransactionAdapter.java:69)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:710)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:435)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:126)
at com.j2fe.workflow.ejb.FlowControllerInternalImpl.executeTransaction(FlowControllerInternalImpl.java:1111)
at com.j2fe.workflow.ejb.FlowControllerInternalImpl.startTransactional(FlowControllerInternalImpl.java:1336)
at com.j2fe.workflow.ejb.FlowControllerBean.activateToken(FlowControllerBean.java:941)
at com.j2fe.workflow.ejb.FlowControllerBean.activateToken(FlowControllerBean.java:855)
at sun.reflect.GeneratedMethodAccessor401.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
at org.jboss.ejb.Container.invoke(Container.java:960)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
at $Proxy69.activateToken(Unknown Source)
at com.j2fe.workflow.ejb.WorkflowWork.execute(WorkflowWork.java:161)
at com.j2fe.workflow.ejb.WorkflowWork.run(WorkflowWork.java:151)
at com.j2fe.clustering.WorkReplicationItem.run(WorkReplicationItem.java:111)
at com.j2fe.clustering.WorkReplication$WorkerThread.run(WorkReplication.java:677)
at com.j2fe.security.JBossSecurityPropagation.execute(JBossSecurityPropagation.java:149)
at com.j2fe.util.ExecutorRunnableAdapter.run(ExecutorRunnableAdapter.java:27)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
at java.lang.Thread.run(Thread.java:619)

The above exception is definitely not due to timeout as in we do not see any delay or wait before the thread logs the exception. Our JTA timeout currently set to 900 seconds (which is already on the higher side)

Please recommend to debug this or understand the root cause.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic