5 Replies Latest reply on Mar 19, 2012 10:07 AM by Tom Jenkinson

    java.lang.IllegalStateException: No EJB client context is available during transaction commit

    Tom Jenkinson Master

      Hi,

       

      I am using JTS in AS7.

       

      I have a client that starts a transaction outside the application server and sends a message with the IOR of the transaction in it.

       

      I then have an MDB which dequeues the message and then resumes the transaction for the given IOR. This MDB then calls an EJB configured with an attribute of Mandatory and then uses corba to connect back to the initial client to give it the result.

       

      The client component then calls commit on the transaction using OTS.

       

      I get the following stack trace:

      22:07:12,166 WARN  [com.arjuna.ats.jtax] (RequestProcessor-9) ARJUNA024004: Caught the following error while trying to single phase complete resource: java.lang.IllegalStateException: No EJB client context is available

          at org.jboss.ejb.client.EJBClientContext.requireCurrent(EJBClientContext.java:233)

          at org.jboss.ejb.client.EJBClientManagedTransactionContext$ResourceImpl.commit(EJBClientManagedTransactionContext.java:220)

          at com.arjuna.ats.internal.jta.resources.jts.orbspecific.XAResourceRecord.commit_one_phase(XAResourceRecord.java:720) [jbossjts-4.16.2.Final.jar:]

          at com.arjuna.ArjunaOTS.OTSAbstractRecordPOA._invoke(OTSAbstractRecordPOA.java:63) [jbossjts-4.16.2.Final.jar:]

          at org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:306) [jacorb-2.3.1.jbossorg-1.jar:]

          at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:614) [jacorb-2.3.1.jbossorg-1.jar:]

          at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:757) [jacorb-2.3.1.jbossorg-1.jar:]

       

      22:07:12,172 WARN  [jacorb.poa.controller] (RequestController-1) rid: 192 opname: _get_type_id cannot process request, because object doesn't exist

      22:07:12,178 WARN  [jacorb.poa.controller] (RequestController-1) rid: 192 opname: _get_type_id request rejected with exception: null

      22:07:12,178 ERROR [jacorb.poa.controller] (RequestProcessor-10) rid: 17 opname: commit invocation: throwable was thrown.: java.lang.NullPointerException

          at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2380) [jbossjts-4.16.2.Final.jar:]

          at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1466) [jbossjts-4.16.2.Final.jar:]

          at com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple.commit(ArjunaTransactionImple.java:375) [jbossjts-4.16.2.Final.jar:]

          at com.arjuna.ArjunaOTS.ArjunaTransactionPOATie.commit(ArjunaTransactionPOATie.java:73) [jbossjts-4.16.2.Final.jar:]

          at com.arjuna.ArjunaOTS.ArjunaTransactionPOA._invoke(ArjunaTransactionPOA.java:112) [jbossjts-4.16.2.Final.jar:]

          at org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:306) [jacorb-2.3.1.jbossorg-1.jar:]

          at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:614) [jacorb-2.3.1.jbossorg-1.jar:]

          at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:757) [jacorb-2.3.1.jbossorg-1.jar:]

       

      Any ideas/suggestions would be gratefully received!

       

      Tom