3 Replies Latest reply on Jun 5, 2015 10:35 AM by kurdt

    No EJB receiver available for handling

    kurdt

      Hi,

       

      First of all, sorry if this is too basic, I did the homework and search a lot to find out what is happening here and I am stuck.

       

      This is my environment:

      wildfly-8.1.0.Final

      Eclipse Luna 4.4.2

      Java 1.8

       

      I am basically following this example to call EJBs from a remote j2se app https://docs.jboss.org/author/display/AS72/EJB+invocations+from+a+remote+client+using+JNDI

      but with my own beans, the EJBs are deploying just fine, the problem arises when I try to call them from a remote client, this is the server side error:

       

      17:46:35,722 ERROR [org.jboss.as.ejb3] (default task-6) JBAS014248: Exception on channel Channel ID 50d90c80 (inbound) of Remoting connection 559c750e to /127.0.0.1:51288 from message org.jboss.remoting3.remote.InboundMessage$3@5803e757: java.io.IOException: JBAS014560: Could not open message outputstream for writing to Channel

        at org.jboss.as.ejb3.remote.protocol.AbstractMessageHandler.writeException(AbstractMessageHandler.java:102)

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.processMessage(MethodInvocationMessageHandler.java:166)

        at org.jboss.as.ejb3.remote.protocol.versionone.VersionOneProtocolChannelReceiver.processMessage(VersionOneProtocolChannelReceiver.java:205)

        at org.jboss.as.ejb3.remote.protocol.versiontwo.VersionTwoProtocolChannelReceiver.processMessage(VersionTwoProtocolChannelReceiver.java:71)

        at org.jboss.as.ejb3.remote.protocol.versionone.VersionOneProtocolChannelReceiver.handleMessage(VersionOneProtocolChannelReceiver.java:147)

        at org.jboss.remoting3.remote.RemoteConnectionChannel$5.run(RemoteConnectionChannel.java:452)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]

       

      and this is the client side error

       

      INFO: EJBCLIENT000013: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1d371b2d, receiver=Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@543c6f6d,channel=jboss.ejb,nodename=hal]} on channel Channel ID a14e638d (outbound) of Remoting connection 5cb93e5b to localhost/127.0.0.1:8080

      Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:, moduleName:CarpetaBairesEJB, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@255b53dc

        at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:749)

        at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116)

        at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

        at org.jboss.ejb.client.EJBClientInvocationContext.retryRequest(EJBClientInvocationContext.java:211)

        at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:256)

        at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:265)

        at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:198)

        at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)

        at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)

        at com.sun.proxy.$Proxy0.save(Unknown Source)

        at ApplicationClient.invokeStatelesBean(ApplicationClient.java:34)

        at ApplicationClient.main(ApplicationClient.java:18)

       

      jndi bindings for the session bean that are logged at deploy time on wildfly:

       

      java:global/CarpetaBairesEJB/ClienteFacadeImp!net.domain.bpack.facade.ClienteFacade
      java:app/CarpetaBairesEJB/ClienteFacadeImp!net.domain.bpack.facade.ClienteFacade
      java:module/ClienteFacadeImp!net.domain.bpack.facade.ClienteFacade
      java:jboss/exported/CarpetaBairesEJB/ClienteFacadeImp!net.domain.bpack.facade.ClienteFacade
      java:global/CarpetaBairesEJB/ClienteFacadeImp
      java:app/CarpetaBairesEJB/ClienteFacadeImp
      java:module/ClienteFacadeImp

       

      And I am calling it this way:

       

      ejb:/CarpetaBairesEJB//ClienteFacadeImp!net.domain.bpack.facade.ClienteFacade

       

      Many many thanks for your time reading this and answer.

        • 1. Re: No EJB receiver available for handling
          wdfink

          How your client side code look like.

          Maybe the wildfly quickstart ejb-remote helps as a working example.

          • 2. Re: No EJB receiver available for handling
            kurdt

            Hi Wolf,

            First of all, thanks for your answer.

             

            I see that the wildfly quickstart ejb-remote looks exactly as the other example...

             

            My Client side code looks like this:

             

               private static ClienteFacade lookupRemoteStatelessCalculator() throws NamingException {

                    final Hashtable jndiProperties = new Hashtable();

                   

                    jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

                   

                            final Context context = new InitialContext(jndiProperties);

                    final String appName = "";

                    final String moduleName = "CarpetaBairesEJB";

                    final String distinctName = "";

                    final String beanName = ClienteFacadeImp.class.getSimpleName();

                    final String viewClassName = ClienteFacade.class.getName();

                    return (ClienteFacade) context.lookup("ejb:" + appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName);

             

                   

                }

            • 3. Re: No EJB receiver available for handling
              kurdt

              Well I forgot to serialize the objects, (basic!!) I am sorry, it's working now.

              Many thanks for your answer.