"MysqlXAException: XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency" during periodic recovery operations in JBoss EAP

Solution Verified - Updated -

Issue

  • Using MySQL 8 (or later) with one or more XA-enabled datasource pools.
  • Repeated WARN events logged when the JBoss EAP periodic recovery thread runs:

    ... WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: com.mysql.cj.jdbc.MysqlXAException: XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency
            at com.mysql.cj.jdbc.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:344)
            at com.mysql.cj.jdbc.MysqlXAConnection.recover(MysqlXAConnection.java:189)
            at com.mysql.cj.jdbc.MysqlXAConnection.recover(MysqlXAConnection.java:117)
            at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.recover(XAManagedConnection.java:373)
            at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.recover(XAResourceWrapperImpl.java:185)
            at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass(XARecoveryModule.java:634)
            at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:226)
            at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:171)
            at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:770)
            at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:382)
    Caused by: java.sql.SQLException: XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency
            at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
            at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
            at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
            at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1200)
            at com.mysql.cj.jdbc.MysqlXAConnection.recover(MysqlXAConnection.java:168)
            ...
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7
  • MySQL 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content