0 Replies Latest reply on Jul 11, 2013 7:59 AM by Martin Varga

    Remote EJB invocation from standalone client to JBoss 7.1.1.Final fails after server restart

    Martin Varga Newbie

      I am having problems while trying to invoke a remote EJB deployed on JBoss 7.1.1.Final from a standalone client. It is working fine when I start JBoss, start the client and then use the client to call the EJB. When I restart JBoss, the remote invocation no longer works. I used all possible workarounds from these forums, but nothing worked. My properties passed to the constructor of InitialContext constructor should be fine, and it works the first time. I am also creating a new Initial Context before each call to the server. I also tried calling close() on the Initial contect after I use it, but still no success. My client is running the whole time, when I restart it, everything works again.

       

      While calling the EJB after server restart, I always hit the following exception:

       

      {code}

      java.lang.IllegalStateException: No EJB receiver available for handling [appName:my-app,modulename:my-ejb,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@40ae67cc

       

      org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584),

      org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119),

      org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181),

      org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136),

      org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121),

      org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104),

      $Proxy1.helloWorld(Unknown Source)

      {code}

       

      The client code looks fine, it doesn't do anything else than: create context, lookup, use the remote ejb. I checked that the initial context - different objects before each call.

       

      Any ideas or pointers where to look are appreciated. Unfortunately I can't use different version of JBoss 7.