Hi,
We have implemented some distributed transactions with JBoss 3.2.3 over a SQLServer 2000 database. There is the Microsoft SQLServer JDBC driver and the JBoss default Transaction Manager in between.
Now and then we see this error.
WARN [org.jboss.tm.TransactionImpl] : XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//55, BranchQual=] errorCode=XAER_RMERR
javax.transaction.xa.XAException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]xa_start (40000) returns -8
at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.start(Unknown Source)
at com.microsoft.jdbcx.base.BaseXAResource.start(Unknown Source)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:143)
at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1148)
This inturn causes JBoss to throw this error
INFO [org.jboss.resource.connectionmanager.TxConnectionManager] Could not enlist in transaction on entering meta-aware object!
javax.transaction.SystemException: enlistResource failed
at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:468)
at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
The JDBC driver is returning an XA error code of '-8'. This seems to be XAER_DUPID, which according to the javadoc is
The XID already exists.
Moderated: Search for previous discussions.
In particular search on isSameRM
OR download 3.2.4+ to get an example MSSQL-ds.xml
that contains the workarounds for bugs in their driver.