2 Replies Latest reply on Feb 1, 2008 12:08 PM by Jonathan Halliday

    Two Phase Commit,Transaction Fail when 2 not related Transac

    Jianming Yu Newbie

      I am using Jboss 4.2.1/4.2.2 and EJB3/CMP . When I have a transaction A write to DB2 table a through web service. And another transaction B query on DB2 Table b through web UI. Transaction A fail. Table a and table b is not related. And Transaction is in-doubt state.

      Would you please give me a help?

      Thanks,

      James

      com.ibm.db2.jcc.b.cj: XAER_NOTA


      *********************start*************************
      ERROR [XAManagedConnectionFactory] End transaction failed for XAResource
      com.ibm.db2.jcc.b.cj: XAER_NOTA
      at com.ibm.db2.jcc.uw.UWXAResource.a(UWXAResource.java:619)
      at com.ibm.db2.jcc.uw.UWXAResource.end(UWXAResource.java:194)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:147)
      at org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.end(JcaXAResourceWrapper.java:58)
      at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelPrepare(XAResourceRecord.java:259)
      at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2871)
      at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2828)
      at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2382)
      at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1783)
      at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:88)
      at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
      at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
      at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
      at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
      at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      ******************************************
      03:50:50,002 WARN [TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@693b3f[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@f18506 handles=1 lastUse=1201751449882 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@16731a8 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1ed3030 xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@139f822 txSync=null]
      com.ibm.db2.jcc.b.cj: XAER_NOTA
      at com.ibm.db2.jcc.uw.UWXAResource.a(UWXAResource.java:619)
      at com.ibm.db2.jcc.uw.UWXAResource.end(UWXAResource.java:194)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:147)
      at org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.end(JcaXAResourceWrapper.java:58)
      at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelPrepare(XAResourceRecord.java:259)
      at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2871)
      ************************************
      03:50:50,021 WARN [loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.rollbackxaerror] [com.arjuna.ats.internal.jta.resources.arjunacore.rollbackxaerror] XAResourceRecord.rollback - xa error XAException.XAER_RMFAIL
      03:50:50,021 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_54] - Top-level abort of action 7f000001:e7bf:47a13f01:20c2 received TwoPhaseOutcome.FINISH_ERROR from <ClassName:RecordType.JTA_RECORD>
      03:50:50,015 INFO [StringType] could not read column value from result set: ACTIVEFLAG3_; [ibm][db2][jcc][10120][10898] Invalid operation: result set is closed.
      03:50:50,022 WARN [AbstractBatcher] exception clearing maxRows/queryTimeout
      com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10120][10943] Invalid operation: statement is closed.
      at com.ibm.db2.jcc.b.hh.A(hh.java:2416)
      at com.ibm.db2.jcc.b.hh.getMaxRows(hh.java:615)
      *************************************************************************
      java.lang.RuntimeException: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
      at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)
      at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)