[infinispan-issues] [JBoss JIRA] Created: (ISPN-1175) XA transaction rollback failure throws the wrong exception and fails to cleanup the transaction table

Sanne Grinovero (JIRA) jira-events at lists.jboss.org
Fri Jun 10 15:03:59 EDT 2011


XA transaction rollback failure throws the wrong exception and fails to cleanup the transaction table
-----------------------------------------------------------------------------------------------------

                 Key: ISPN-1175
                 URL: https://issues.jboss.org/browse/ISPN-1175
             Project: Infinispan
          Issue Type: Bug
          Components: Transactions
    Affects Versions: 5.0.0.CR5
            Reporter: Sanne Grinovero
            Assignee: Mircea Markus
             Fix For: 5.0.0.CR6


I'm getting an NPE, as tx is null at org.infinispan.transaction.TransactionTable.failureCompletingTransaction(Transaction tx)

being invoked from org.infinispan.transaction.TransactionCoordinator.rollback(LocalTransaction)
which has this code:
{code}LocalTxInvocationContext ctx = icc.createTxInvocationContext();
      ctx.setLocalTransaction(localTransaction);
      try {
         invoker.invoke(ctx, rollbackCommand);
         txTable.removeLocalTransaction(localTransaction);
      } catch (Throwable e) {
         txTable.failureCompletingTransaction(ctx.getTransaction());
         log.errorRollingBack(e);
         throw new XAException(XAException.XA_HEURHAZ);
      } finally {
         icc.suspend();
      }{code}

you cant see that a localtransaction is set on the context, but then ctx.getTransaction() is passed to the failing method. This variable was unset.

so basically I debugged it already but I'm not sure how this should be solved.

This is currently reproducible by running org.infinispan.lock.APITest (as it fails for some other reason)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list