1 Reply Latest reply on Oct 30, 2015 9:58 AM by Giovanni Zito

    Wildfly 8.0.Final XA transaction fails with Unabled to enlist resource error

    Richard Yang Apprentice

      I am using Wildfly 8.0.0.Final and when my entity manager try to commit (on two different mysql xa datasources), I got the errors. I tried the suggestion from other thread to downgrade the ironjacamar (all core, api and jdbc) and wildfly failed to start. So i have to give up on the downgrading approach.

      What could be the reason? The same code works fine in jboss eap 6.0.

      Please what else it can be done to solve this problem?

       

      The following is partial error log:

      Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@4724cc62[state=DESTROYED managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@7e13cea4 connection handles=0 lastUse=1393817891202 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@83a750a mcp=SemaphoreArrayListManagedConnectionPool@467b56ae[pool=slave-1] xaResource=XAResourceWrapperImpl@35d9e7be[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@7e13cea4 pad=false overrideRmValue=null productName=MySQL productVersion=5.5.31-30.3-log jndiName=java:jboss/datasources/slave-1] txSync=null]
          at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:150)
          at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
          at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
          at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
          ... 153 more
      Caused by: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@4724cc62[state=DESTROYED managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@7e13cea4 connection handles=0 lastUse=1393817891202 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@83a750a mcp=SemaphoreArrayListManagedConnectionPool@467b56ae[pool=slave-1] xaResource=XAResourceWrapperImpl@35d9e7be[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@7e13cea4 pad=false overrideRmValue=null productName=MySQL productVersion=5.5.31-30.3-log jndiName=java:jboss/datasources/slave-1] txSync=null]
          at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.reconnectManagedConnection(AbstractConnectionManager.java:773)
          at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:516)
          at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:142)
          ... 156 more
      Caused by: javax.resource.ResourceException: IJ000461: Could not enlist in transaction on entering meta-aware object
          at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:530)
          at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.reconnectManagedConnection(AbstractConnectionManager.java:768)
          ... 158 more
      Caused by: javax.transaction.SystemException: IJ000356: Failed to enlist: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 0:ffff0a19a824:1e37a50d:5313f870:44f status: ActionStatus.ABORT_ONLY >
          at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener$TransactionSynchronization.checkEnlisted(TxConnectionListener.java:808)
          at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.enlist(TxConnectionListener.java:362)
          at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:523)
          ... 159 more