xadisk
  1. xadisk
  2. XADISK-122

NullPointerException on transaction completion when timeout has been detected

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      GlassFish 3.1.2
      JDK 1.7.0_05

      Description

      When XADisk detectes transaction timeout, NPE is raised on transaction completion.

      First timeout occurs and XADisk throws TransactionRolledBackException which is intercepted by application:

      Caused by: org.xadisk.filesystem.exceptions.TransactionRolledbackException: The method call expected a transaction to be associated, but no such transaction exists. An associated transaction that could be expected by the client had been rolled back earlier.
      at org.xadisk.filesystem.NativeSession.checkIfCanContinue(NativeSession.java:1146) ~[xadisk.jar:na]
      at org.xadisk.filesystem.NativeSession.fileExists(NativeSession.java:396) ~[xadisk.jar:na]
      at org.xadisk.filesystem.NativeSession.fileExists(NativeSession.java:385) ~[xadisk.jar:na]
      at org.xadisk.connector.outbound.XADiskConnectionImpl.fileExists(XADiskConnectionImpl.java:94) ~[xadisk.jar:na]
      at pl.ispik.iuip.infrastructure.vfs.bean.XaDiskOperations.exists(XaDiskOperations.java:43) ~[iuip-impl-vfs.jar:na]
      ... 173 common frames omitted
      org.xadisk.filesystem.exceptions.TransactionTimeoutException: The transaction associated earlier was rolled back by XADisk because the transaction was open for more than the transaction timeout value.
      at org.xadisk.filesystem.workers.TransactionTimeoutDetector.doWorkOnce(TransactionTimeoutDetector.java:38) ~[xadisk.jar:na]
      at org.xadisk.filesystem.workers.TimedWorker.run(TimedWorker.java:42) ~[xadisk.jar:na]
      at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114) ~[work-management.jar:3.1.2]
      at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497) ~[glassfish-corba-orbgeneric.jar:na]
      at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540) ~[glassfish-corba-orbgeneric.jar:na]

      When transaction completes XADisk throws NPE:

      java.lang.NullPointerException: null
      at org.xadisk.filesystem.NativeXAFileSystem.getSessionForTransaction(NativeXAFileSystem.java:290) ~[xadisk.jar:na]
      at org.xadisk.filesystem.NativeXAFileSystem.getSessionForTransaction(NativeXAFileSystem.java:54) ~[xadisk.jar:na]
      at org.xadisk.connector.XAResourceImpl.end(XAResourceImpl.java:68) ~[xadisk.jar:na]
      at com.sun.jts.jta.TransactionState.beforeCompletion(TransactionState.java:160) ~[jts.jar:3.1.2]
      at com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:135) [jts.jar:3.1.2]
      at com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:158) [jts.jar:3.1.2]
      at com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2548) [jts.jar:3.1.2]
      at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:279) [jts.jar:3.1.2]
      at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:250) [jts.jar:3.1.2]
      at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:633) [jts.jar:3.1.2]
      at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:332) [jts.jar:3.1.2]
      at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.commitDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:185) [jts.jar:3.1.2]
      at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:861) [jta.jar:3.1.2]
      at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5136) [ejb-container.jar:3.1.2]
      at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4901) [ejb-container.jar:3.1.2]
      at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045) [ejb-container.jar:3.1.2]
      at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994) [ejb-container.jar:3.1.2]
      at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:213) [ejb-container.jar:3.1.2]
      at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:79) [ejb-container.jar:3.1.2]

        Activity

        Hide
        Nitin Verma added a comment -

        Checked-in the changes to trunk.

        Show
        Nitin Verma added a comment - Checked-in the changes to trunk.

          People

          • Assignee:
            Nitin Verma
            Reporter:
            titmus
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: