8 Replies Latest reply on Oct 21, 2012 9:09 PM by jaikiran pai

    Transaction being rolled back because of "No EJBReceiver available for node name"?

    Newbie

      Hi!

       

      I'm trying to implement a distributed transaction call between two EJB's in different standalone servers, both deployed on JBoss AS 7.1.1.Final.

       

      Here is the scenario:

      • On "server1" I have deployed an EJB "ejb1" that persist an entity in a database "db1". A remote call on this EJB is working fine from another JBoss AS 7 Server.
      • On "server2" I have deployed another EJB "ejb2" that calls "ejb1" and after that persist another entity in a database "db2".

       

      I hope someone can help me on this.

       

      More information:

      • The servers are starting with standalone-full configuration;
      • The two databases are PostgreSQL, and both JBoss AS Servers (server1 and server2) are configured with XA Datasources;
      • The entities are persisted with JPA, and the persistence.xml has "transaction-type=JTA" and a "jta-data-source" declaration to the datasources;
      • There is a "remote ejb receiver" configured in "server2" that points to "server1", so any remote ejb calls pass through this connection; On the archive of "ejb2", in directory META-INF, is included a "jboss-ejb-client.xml" configuration file, that points to that connection;
      • The "jacorb" subsystem is configured with transactions on:

       

      {code:xml}

              <subsystem xmlns="urn:jboss:domain:jacorb:1.1">

                  <orb>

                      <initializers security="on" transactions="on"/>

                  </orb>

              </subsystem>

      {code}

       

      • The "transactions" subsystem is configured with jts:

       

      {code:xml}

              <subsystem xmlns="urn:jboss:domain:transactions:1.1">

                  <core-environment>

                      <process-id>

                          <uuid/>

                      </process-id>

                  </core-environment>

                  <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                  <coordinator-environment default-timeout="300"/>

                  <jts/>

              </subsystem>

      {code}

       

      • The EJB's are statless session beans;
      • On "ejb1" and "ejb2", the EntityManager is injected with @PersistenceContext;
      • On "ejb2", the reference to "ejb1" is injected with @EJB(lookup="ejb:/myapp1//EJB1!EJB1Remote"). The injection and any remote calls are working fine;

       

      The code is like this (I have to rename the classes due to confidenciality):

       

      @Stateless

      public class EJB1 implements EJB1Remote {

       

                @PersistenceContext

                private EntityManager em;

       

                @Override

                public void testEjb1(Entity1 entity) throws Exception {

                          em.persist(entity);

                }

      }

       

      @Stateless

      public class EJB2 {

       

                @PersistenceContext

                private EntityManager em;

       

                @EJB(lookup="ejb:/myapp1//EJB1!EJB1Remote")

                private EJB1Remote ejb1;

       

                @Override

                public void testEjb2(Entity1 entity1) throws Exception {

                          ejb1.testEjb1(entity1);

                          Entity2 entity2 = new Entity2(...);

                          em.persist(entity2);

                }

      }

       

       

      On the "server2" logs, there are some messages that could help:

       

      09:22:55,775 DEBUG [org.jboss.as.ejb3.deployment.processors.EJBClientDescriptorMetaDataProcessor] (MSC service thread 1-4) Deployment unit deployment "myapp2.war" will use service jboss.ejb3.dd-based-ejb-client-context."myapp2.war" as the EJB client context service

      09:22:55,837 DEBUG [org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService] (MSC service thread 1-4) Added a local EJB receiver to descriptor based EJB client context named service jboss.ejb3.dd-based-ejb-client-context."myapp2.war"

      09:22:55,837 DEBUG [org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService] (MSC service thread 1-4) Creating remoting EJB receiver for connection remote-ejb-connection

      09:22:56,337 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "pat38440" task-4) Channel Channel ID e7e4150a (outbound) of Remoting connection 0117b6ce to PAT39450/10.181.77.204:4447 opened for context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@113affb, receiver=Remoting connection EJB receiver [connection=Remoting connection <220e8b>,channel=jboss.ejb,nodename=pat39450]} Waiting for version handshake message from server

      09:22:56,353 INFO  [org.jboss.ejb.client.remoting.VersionReceiver] (Remoting "pat38440" task-4) Received server version 1 and marshalling strategies [river]

      09:22:56,368 INFO  [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (MSC service thread 1-4) Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@113affb, receiver=Remoting connection EJB receiver [connection=Remoting connection <220e8b>,channel=jboss.ejb,nodename=pat39450]} on channel Channel ID e7e4150a (outbound) of Remoting connection 0117b6ce to PAT39450/10.181.77.204:4447

      09:22:56,384 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "pat38440" task-2) Received module availability report for 2 modules

      09:22:56,384 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "pat38440" task-2) Registering module EJBModuleIdentifier{appName='jsr-77', moduleName='jsr-77', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@113affb, receiver=Remoting connection EJB receiver [connection=Remoting connection <220e8b>,channel=jboss.ejb,nodename=pat39450]}

      09:22:56,384 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "pat38440" task-2) Registering module EJBModuleIdentifier{appName='', moduleName='myapp2', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@113affb, receiver=Remoting connection EJB receiver [connection=Remoting connection <220e8b>,channel=jboss.ejb,nodename=pat39450]}

      09:22:56,400 DEBUG [org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService] (MSC service thread 1-4) Added 1 remoting EJB receivers to descriptor based EJB client context named service jboss.ejb3.dd-based-ejb-client-context."myapp2.war"

      09:22:56,400 WARN  [org.jboss.ejb.client.remoting.ChannelAssociation] (Remoting "pat38440" task-2) Unsupported message received with header 0xffffffff

      09:22:56,400 DEBUG [org.jboss.as.ejb3.deployment.processors.EjbClientContextSetupProcessor] (MSC service thread 1-4) Registering EJB client context org.jboss.ejb.client.EJBClientContext@113affb for classloader ModuleClassLoader for Module "deployment.myapp2.war:main" from Service Module Loader

       

      ...

       

      09:35:51,259 DEBUG [org.jboss.as.jpa] (Thread-80) created new TransactionScopedEntityManager for unit name=myapp2.war#myds

      09:35:51,275 DEBUG [org.jboss.ejb.client.EJBClientContext] (Thread-80) org.jboss.ejb.client.RandomDeploymentNodeSelector@3749d7 deployment node selector selected pat39450 node for appname=,modulename=myapp1,distinctname=

      09:35:51,650 DEBUG [org.hibernate.internal.SessionImpl] (Thread-80) Opened session at timestamp: 13496997516

      09:35:51,650 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (Thread-80) Skipping JTA sync registration due to auto join checking

      09:35:51,665 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (Thread-80) successfully registered Synchronization

      09:35:51,665 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] (Thread-80) Looking for a JTA transaction to join

      09:35:51,681 DEBUG [org.jboss.as.jpa] (Thread-80) Thread-80:[transaction scoped EntityManager]: created entity manager session TransactionImple < jts, 0:ffff0ab54cb6:-294248b6:5072c77e:38 >

      09:35:51,697 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (Thread-80) Obtaining JDBC connection

      09:35:52,650 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (RequestProcessor-5) Released JDBC connection

      09:35:52,665 DEBUG [org.jboss.as.ejb3.remote.TCCLEJBClientContextSelector] (RequestProcessor-5) Returning default EJB client context org.jboss.ejb.client.EJBClientContext@d27bb0 since no EJB client context could be found for TCCL ModuleClassLoader for Module "org.jboss.jts:main" from local module loader @77eaf8 (roots: C:\Prodemge\jboss-as-7.1.1.Final\modules)

      09:35:52,681 WARN  [com.arjuna.ats.jtax] (RequestProcessor-5) ARJUNA024015: XAResource prepare failed on resource org.jboss.ejb.client.EJBClientManagedTransactionContext$ResourceImpl@14a0173 for transaction < 131072, 29, 36, 0000000000-1-110-7576-74-42-67-737480114-571260005649, 29292929292929292929282839-46105-45-13-38-44103109143-28155292929857829292929292929 > with: -: java.lang.IllegalStateException: No EJBReceiver available for node name pat39450

                at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiver(EJBClientContext.java:613)

                at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiverContext(EJBClientContext.java:648)

                at org.jboss.ejb.client.EJBClientManagedTransactionContext$ResourceImpl.prepare(EJBClientManagedTransactionContext.java:213)

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

                at com.arjuna.ArjunaOTS.OTSAbstractRecordPOA._invoke(OTSAbstractRecordPOA.java:83) [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:]

       

      09:35:52,697 WARN  [com.arjuna.ats.arjuna] (Thread-80) ARJUNA012073: BasicAction.End() - prepare phase of action-id 0:ffff0ab54cb6:-294248b6:5072c77e:38 failed.

      09:35:52,712 WARN  [com.arjuna.ats.arjuna] (Thread-80) ARJUNA012075: Action Aborting

      09:35:52,712 WARN  [com.arjuna.ats.jts] (Thread-80) ARJUNA022223: ExtendedResourceRecord.topLevelAbort caught exception: org.omg.CORBA.UNKNOWN: Server-side Exception: null

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_29]

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_29]

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_29]

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_29]

                at org.jacorb.orb.SystemExceptionHelper.read(SystemExceptionHelper.java:223) [jacorb-2.3.1.jbossorg-1.jar:]

                at org.jacorb.orb.ReplyReceiver.getReply(ReplyReceiver.java:319) [jacorb-2.3.1.jbossorg-1.jar:]

                at org.jacorb.orb.Delegate.invoke_internal(Delegate.java:1090) [jacorb-2.3.1.jbossorg-1.jar:]

                at org.jacorb.orb.Delegate.invoke(Delegate.java:957) [jacorb-2.3.1.jbossorg-1.jar:]

                at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:80) [jacorb-2.3.1.jbossorg-1.jar:]

                at com.arjuna.ArjunaOTS._ArjunaSubtranAwareResourceStub.rollback(_ArjunaSubtranAwareResourceStub.java:98)

                at com.arjuna.ats.internal.jts.resources.ExtendedResourceRecord.topLevelAbort(ExtendedResourceRecord.java:445)

                at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2874)

                at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2853)

                at com.arjuna.ats.arjuna.coordinator.BasicAction.phase2Abort(BasicAction.java:1908)

                at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1485)

                at com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple.commit(ArjunaTransactionImple.java:375)

                at com.arjuna.ats.internal.jts.ControlWrapper.commit(ControlWrapper.java:243)

                at com.arjuna.ats.internal.jts.orbspecific.CurrentImple.commit(CurrentImple.java:247)

                at com.arjuna.ats.jts.extensions.AtomicTransaction.commit(AtomicTransaction.java:276)

                at com.arjuna.ats.internal.jta.transaction.jts.TransactionImple.commitAndDisassociate(TransactionImple.java:1290)

                at com.arjuna.ats.internal.jta.transaction.jts.BaseTransaction.commit(BaseTransaction.java:130)

                at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:232) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at EJB2.save(Unknown Source)

      09:35:52,806 WARN  [com.arjuna.ats.arjuna] (Thread-80) ARJUNA012091: Top-level abort of action 0:ffff0ab54cb6:-294248b6:5072c77e:38 received TwoPhaseOutcome.FINISH_ERROR from com.arjuna.ats.internal.jts.resources.ExtendedResourceRecord

      09:35:52,822 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (RequestProcessor-5) java:/myds: returnConnection(1ceaf4c, false) [1/19]

      09:35:52,837 DEBUG [org.jboss.as.jpa] (RequestProcessor-5) RequestProcessor-5:[transaction scoped EntityManager]: closing entity managersession

      09:35:52,853 WARN  [com.arjuna.ats.jts] (RequestProcessor-5) ARJUNA022261: ServerTopLevelAction detected that the transaction was inactive

      09:35:52,853 DEBUG [org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl] (RequestProcessor-5) HHH000420: Closing un-released batch

      09:35:52,853 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (RequestProcessor-5) Aggressively releasing JDBC connection

      09:35:52,931 ERROR [org.jboss.ejb3.invocation] (Thread-80) JBAS014134: EJB Invocation failed on component EJB2 for method public abstract void testEjb2(Entity1) throws java.lang.Exception: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:115) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:95) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:232) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at EJB2.save(Unknown Source)

      Caused by: javax.transaction.RollbackException: org.omg.CORBA.TRANSACTION_ROLLEDBACK

                at com.arjuna.ats.internal.jta.transaction.jts.TransactionImple.commitAndDisassociate(TransactionImple.java:1318)

                at com.arjuna.ats.internal.jta.transaction.jts.BaseTransaction.commit(BaseTransaction.java:130)

                at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                ... 27 more

       

       

      I don't know where else to look for to solve this problem.

       

      Please ask for any other configuration or logs you want to see.

       

      Thank you,

      Kieras.

        • 1. Re: Transaction being rolled back because of "No EJBReceiver available for node name"?
          Newbie

          I made another test in wich I removed the persist code on EJB2.

          The persist on EJB1 was called but not commited on db1.

           

          Here is the log:

           

          15:08:20,838 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "myapp2.war"

          15:08:30,135 DEBUG [org.jboss.ejb.client.EJBClientContext] (Thread-80) org.jboss.ejb.client.RandomDeploymentNodeSelector@f66f2f deployment node selector selected pat39450 node for appname=,modulename=myapp1,distinctname=

          15:08:30,400 DEBUG [org.jboss.ejb.client.EJBClientContext] (Thread-80) org.jboss.ejb.client.RandomDeploymentNodeSelector@f66f2f deployment node selector selected pat39450 node for appname=,modulename=myapp1,distinctname=

          15:09:03,525 DEBUG [org.jboss.ejb.client.EJBClientContext] (Thread-80) org.jboss.ejb.client.RandomDeploymentNodeSelector@f66f2f deployment node selector selected pat39450 node for appname=,modulename=myapp1,distinctname=

          15:09:09,978 DEBUG [org.jboss.ejb.client.EJBClientContext] (Thread-80) org.jboss.ejb.client.RandomDeploymentNodeSelector@f66f2f deployment node selector selected pat39450 node for appname=,modulename=myapp1,distinctname=

          15:09:10,463 DEBUG [org.jboss.as.ejb3.remote.TCCLEJBClientContextSelector] (RequestProcessor-5) Returning default EJB client context org.jboss.ejb.client.EJBClientContext@1d9626b since no EJB client context could be found for TCCL ModuleClassLoader for Module "org.jboss.jts:main" from local module loader @e35bb7 (roots: C:\Prodemge\jboss-as-7.1.1.Final\modules)

          15:09:10,463 WARN  [com.arjuna.ats.jtax] (RequestProcessor-5) ARJUNA024004: Caught the following error while trying to single phase complete resource: java.lang.IllegalStateException: No EJBReceiver available for node name pat39450

                    at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiver(EJBClientContext.java:613)

                    at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiverContext(EJBClientContext.java:648)

                    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:]

           

          15:09:10,494 WARN  [jacorb.poa.controller] (RequestController-1) rid: 4 opname: _get_type_id cannot process request, because object doesn't exist

          15:09:10,494 WARN  [jacorb.poa.controller] (RequestController-1) rid: 4 opname: _get_type_id request rejected with exception: null

          15:09:10,494 WARN  [jacorb.poa.controller] (RequestController-1) rid: 6 opname: _get_type_id cannot process request, because object doesn't exist

          15:09:10,494 WARN  [jacorb.poa.controller] (RequestController-1) rid: 6 opname: _get_type_id request rejected with exception: null

          15:09:10,494 WARN  [com.arjuna.ats.jts] (Thread-80) ARJUNA022228: ExtendedResourceRecord.typeIs failed. Returning default value: 151

          15:09:45,478 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Recovery user name=GDRDADM

          15:09:45,494 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Recovery Subject=Subject:

                    Principal: GDRDADM

                    Credencial privada: javax.resource.spi.security.PasswordCredential@636bce7b

           

          15:09:45,494 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Open managed connection (Subject:

                    Principal: GDRDADM

                    Credencial privada: javax.resource.spi.security.PasswordCredential@636bce7b

          )

          15:09:45,494 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Open connection (org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@e99cbb, Subject:

                    Principal: GDRDADM

                    Credencial privada: javax.resource.spi.security.PasswordCredential@636bce7b

          )

          15:09:45,494 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Closing connection for recovery check (org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@163e085)

          15:09:45,494 DEBUG [org.jboss.jca.core.recovery.DefaultRecoveryPlugin] (Periodic Recovery) No isValid(int) method defined on connection interface (org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6)

          15:09:45,510 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Force close=true

          15:09:45,510 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Closing managed connection for recovery (org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@e99cbb)

          15:09:45,510 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Open managed connection (Subject:

                    Principal: GDRDADM

                    Credencial privada: javax.resource.spi.security.PasswordCredential@636bce7b

          )

          15:09:45,556 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Recovery XAResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@29626e for java:/myds

          15:09:45,572 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) RecoverySecurityDomain was empty

          15:09:45,572 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Subject for recovery was null

          15:11:55,619 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Recovery user name=GDRDADM

          15:11:55,619 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Recovery Subject=Subject:

                    Principal: GDRDADM

                    Credencial privada: javax.resource.spi.security.PasswordCredential@636bce7b

           

          15:11:55,619 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Open managed connection (Subject:

                    Principal: GDRDADM

                    Credencial privada: javax.resource.spi.security.PasswordCredential@636bce7b

          )

          15:11:55,619 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Open connection (org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@29626e, Subject:

                    Principal: GDRDADM

                    Credencial privada: javax.resource.spi.security.PasswordCredential@636bce7b

          )

          15:11:55,635 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Closing connection for recovery check (org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@115cfc9)

          15:11:55,635 DEBUG [org.jboss.jca.core.recovery.DefaultRecoveryPlugin] (Periodic Recovery) No isValid(int) method defined on connection interface (org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6)

          15:11:55,635 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Force close=true

          15:11:55,635 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Closing managed connection for recovery (org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@29626e)

          15:11:55,635 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Open managed connection (Subject:

                    Principal: GDRDADM

                    Credencial privada: javax.resource.spi.security.PasswordCredential@636bce7b

          )

          15:11:55,697 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Recovery XAResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@fcbdaf for java:/myds

          15:11:55,697 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) RecoverySecurityDomain was empty

          15:11:55,697 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Subject for recovery was null

           

           

           

          Any ideas?!

           

          Thanks.

          • 2. Re: Transaction being rolled back because of "No EJBReceiver available for node name"?
            Newbie

            Removing any database access on EJB1 lead to the same result as the last test.

             

            15:09:10,463 WARN  [com.arjuna.ats.jtax] (RequestProcessor-5) ARJUNA024004: Caught the following error while trying to single phase complete resource: java.lang.IllegalStateException: No EJBReceiver available for node name pat39450

                      at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiver(EJBClientContext.java:613)

                      at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiverContext(EJBClientContext.java:648)

                      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:]

            • 3. Re: Transaction being rolled back because of "No EJBReceiver available for node name"?
              jaikiran pai Master

              I am not sure if Jason was talking about this thread, but I was made aware of this issue this morning and we have fix ready for it. Actually the fix was ready around 3 months back but I forgot to push it upstream. I have sent a formal PR for this today and I'll be releasing a EJB client version later tonight and get it integrated upstream to AS7. Once that's done, you should be able to give it a try against the newer version.

              1 of 1 people found this helpful
              • 4. Re: Transaction being rolled back because of "No EJBReceiver available for node name"?
                Newbie

                Thanks Jaikiran.

                 

                Complementing, today I tested on JBoss AS EAP 6.0.0.GA and the same error ocurred.

                I increased the detail of logs for arjuna and jacorb in hope that you could confirm that it's really the issue you are mentioning.

                The EJB invocation is nearly 11:23:32,346.

                 

                What's a PR?

                Could you tell me in what version (not snapshot) this fix is going to be available?

                • 5. Re: Transaction being rolled back because of "No EJBReceiver available for node name"?
                  jaikiran pai Master

                  Alessandro Kieras wrote:

                   

                  Thanks Jaikiran.

                   

                  Complementing, today I tested on JBoss AS EAP 6.0.0.GA and the same error ocurred.

                   

                  The fix isn't available in EAP6 yet.

                   

                   

                  Alessandro Kieras wrote:

                   

                   

                   

                   

                  What's a PR?

                  A PR is a pull request which is basically a bunch of commits which are being requested to be pulled into the main repo. In short, it contains a fix.

                   

                   

                  Alessandro Kieras wrote:

                   

                   

                  Could you tell me in what version (not snapshot) this fix is going to be available?

                  If you are talking about the community version, then it should be available in the next released version. I don't the timeline for that. But if you are a customer using EAP6 then please create a support case via the support portal, we should be able to provide you a one-off patch for this fix.

                  1 of 1 people found this helpful
                  • 6. Re: Transaction being rolled back because of "No EJBReceiver available for node name"?
                    Newbie

                    We're proceeding with the support case.

                    Thank you again.

                    • 7. Re: Transaction being rolled back because of "No EJBReceiver available for node name"?
                      Matt Forshaw Newbie

                      Hi Jaikiran,

                       

                      Would you be able to point me towards the PR for this? Is this something I would be able to apply myself against 7.1.2.Final?

                       

                      All the best,

                      Matt

                      • 8. Re: Transaction being rolled back because of "No EJBReceiver available for node name"?
                        jaikiran pai Master

                        If you are building AS7 from tag then you can just upgrade the ejb-client version in the pom.xml of that project https://github.com/jbossas/jboss-as/blob/7.1.2.Final/pom.xml#L151 to 1.0.12.Final which has been released and contains that fix.