6 Replies Latest reply on Mar 18, 2015 6:33 AM by Tom Jenkinson

    TransactionManager.getTransaction() is returning transaction which is in aborted state

    Jayant Vaish Newbie

      Hi,

      I am using JBoss 4.2.1.GA and getting following error:

       

      2015-03-09 00:42:40,621 1152889083 ERROR [org.xyz.Service] (Server-121 Error:

      org.xyz.ContextException: Unable to register.

        at org.xyz.Scheduler.registerSynchronization(Scheduler.java:328)

        at org.xyz.Service$4.call(Service.java:480)

        at org.xyz.Service$4.call(Service.java:478)

        at org.xyz.Scheduler.exec(Scheduler.java:257)

        at org.xyz.Service.access$400(Service.java:82)

        at org.xyz.Service$1$1.call(Service.java:215)

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

        at java.util.concurrent.FutureTask.run(FutureTask.java:138)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

        at java.lang.Thread.run(Thread.java:662)

      Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.syncwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.syncwhenaborted] Can't register synchronization because the transaction is in aborted state

        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronizationImple(TransactionImple.java:463)

        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronization(TransactionImple.java:439)

        at org.xyz.Scheduler.registerSynchronization(Scheduler.java:316)

        .. 12 more

       

      We get above error for particular thread (In this case we get for "Server-121" )

      While debugging we got to know that:

      txm.getTransaction() is returning the transaction whose status is aborted (txm.getTransaction().getStatus() == Status.STATUS_ROLLEDBACK). For this thread, transaction manager returns the same transaction which is in aborted state after 6 hours also.

      Is it the expected behavior?

      What can be the possible cause and resolution for this problem.

       

      Thanks,

      Jayant