JBoss EAP and ActiveMQ: periodic recovery thread occasionally shows error "XA Exception: Transaction 'XID:[...]' has not been started"
Issue
An application using message-driven beans is deployed on JBoss EAP, and consumes messages from an A-MQ destination via the ActiveMQ resource adapter (RAR). On receipt of a message, the application updates a relational database, such that the message consumption and database update are part of the same XA (two-phase commit) transaction.
The following exception is seen in the EAP log occasionally, and usually under extremes of load:
11:26:57,955 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: Transaction 'XID:[131077,globalId=0:ffff0a1e674a:-268e998f:55629d70:ff5b8,branchId=0:ffff0a1e674a:-268e998f:55629d70:ff5b9]' has not been started. xaErrorCode:-4
at org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:794)
at org.apache.activemq.TransactionContext.rollback(TransactionContext.java:532)
at org.apache.activemq.ra.ActiveMQResourceAdapter$2.rollback(ActiveMQResourceAdapter.java:289)
at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.rollback(XAResourceWrapperImpl.java:186)
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.handleOrphan(XARecoveryModule.java:755) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass(XARecoveryModule.java:661) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:431) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:212) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
Environment
- JBoss A-MQ
- 6.x
- JBoss EAP
- 6.4.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.