4 Replies Latest reply on Oct 12, 2004 9:39 AM by Adrian Brock

    XA Exception during high volume with JDBC2 persistnce on Ora

    Philip Newbie

      When running high volumes of messages using JBossMQ and JDBC2 persistence we appear to get Oracle XA exceptions from the JMS provider.

      15:35:46,501 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=scsatlspap2//14743185, BranchQual=] errorCode=XAER_NOTA
      oracle.jdbc.xa.OracleXAException
      at oracle.jdbc.xa.client.OracleXAResource.prepare(OracleXAResource.java:736)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.prepare(XAManagedConnection.java:174)
      at org.jboss.tm.TransactionImpl.prepareResources(TransactionImpl.java:1496)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:384)
      at org.jboss.tm.TxManager.commit(TxManager.java:141)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:341)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:633)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:433)
      at org.jboss.mq.SpySession.run(SpySession.java:298)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
      at java.lang.Thread.run(Thread.java:536)
      15:35:46,503 WARN [TransactionImpl] xa error: -4 (The XID is not valid.); oracle error: 24756; oracle sql error: 0;
      oracle.jdbc.xa.OracleXAException
      at oracle.jdbc.xa.client.OracleXAResource.prepare(OracleXAResource.java:736)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.prepare(XAManagedConnection.java:174)
      at org.jboss.tm.TransactionImpl.prepareResources(TransactionImpl.java:1496)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:384)
      at org.jboss.tm.TxManager.commit(TxManager.java:141)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:341)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:633)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:433)
      at org.jboss.mq.SpySession.run(SpySession.java:298)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
      at java.lang.Thread.run(Thread.java:536)
      17:00:45,101 ERROR [StdServerSession] failed to commit/rollback
      org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=scsatlspap2//14743185, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (oracle.jdbc.xa.OracleXAException)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:413)
      at org.jboss.tm.TxManager.commit(TxManager.java:141)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:341)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:633)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:433)
      at org.jboss.mq.SpySession.run(SpySession.java:298)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: oracle.jdbc.xa.OracleXAException
      at oracle.jdbc.xa.client.OracleXAResource.prepare(OracleXAResource.java:736)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.prepare(XAManagedConnection.java:174)
      at org.jboss.tm.TransactionImpl.prepareResources(TransactionImpl.java:1496)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:384)
      ... 8 more

      The configuration is that we have an Oracle XA datasource defined and this XA datasource is referenced as the persistence manager for the JMS queue provider. The queues are using by an MDB which is therefore using container managed transactions, they are also used by an SLSB which is using bean managed transactions and we have confirmed that the commit/rollback is always issued in this code.

      The problem does not occur until the product has been running for an extended period of time, then we start to get XA exceptions for JMS activity. We are using on Oracle 9.2.0.5 with JBoss 3.2.3, any help would be greatly appreciated.

      Thanks

      Philip