We are getting XA exception: XAER_OUTSIDE ERRORCODE=-4228 when using new drivers in EAP.
Issue
We use JBoss EAP 6.4.9 GA that has connections to multiple databases. One from these databases is an IBM DB2 that recently had been updated from v9.7.0.8 (Fix Pack 8) to v11.1.4.5 (Fix Pack 5). From the upgrade until now we randomly (about every 30 seconds) see the following error in the server’s log.
2020-05-19 09:47:37,469 WARN [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (ajp-/0.0.0.0:8109-1) IJ000305: Connection error occured: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@74dfc00a[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@22119ce connection handles=0 lastUse=1588920453562 trackByTx=true pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@37ddff13 pool internal context=SemaphoreArrayListManagedConnectionPool@5ff796c8[pool=edb] xaResource=XAResourceWrapperImpl@655e67b0[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@22119ce pad=false overrideRmValue=false productName=DB2/AIX64 productVersion=SQL110145 jndiName=java:/eDBRef] txSync=null]: com.ibm.db2.jcc.am.XaException: [jcc][t4][10401][12066][4.25.23] XA exception: XAER_OUTSIDE ERRORCODE=-4228, SQLSTATE=null
at com.ibm.db2.jcc.am.b6.c(b6.java:561)
at com.ibm.db2.jcc.am.b6.c(b6.java:590)
at com.ibm.db2.jcc.t4.a4.a(a4.java:2105)
at com.ibm.db2.jcc.t4.a4.start(a4.java:2027)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:259)
at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.start(XAResourceWrapperImpl.java:215)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:668)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:429)
at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener$TransactionSynchronization.enlist(TxConnectionListener.java:667)
at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.enlist(TxConnectionListener.java:330)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:482)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.reconnectManagedConnection(AbstractConnectionManager.java:631)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:502)
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:143)
at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:69)
at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:141) [hibernate-core-4.2.23.Final-redhat-1.jar:4.2.23.Final-redhat-1]
As you might imagine the above error causes problems to our applications. The guys that support IBM sent us the newest compatible drivers in order to use them. The problem continues to appear randomly.
As a workaround we put the following parameter in the xa-pool of the datasource: <no-tx-separate-pools>true</no-tx-separate-pools>
. Using this parameter the problem disappears.
We would like to know if it is safe to use the above mentioned parameter in a production environment or we should try to solve the problem that causes the problem?
Environment
- Red Hat JBoss Enterprise Application Platform(EAP)
- 6
- 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.