7 Replies Latest reply on Apr 23, 2012 4:58 PM by aneh

    No EJB receiver available for handling [appName:,modulename:MyMavenWebpp,distinctname:] combination

    ous2k

      Hi i' m new in EJB3

      i'm trying a simple hello example but get this error

      i'm using

      Jboss 7.1 eclipse 3.7 maven3

      i' confused if this is a library problem or properties file problem?

       

      Depandancies used

       

       



      <!-- EJB3 libraries -->


      <dependency>



      <groupId>org.jboss.xnio</groupId>



      <artifactId>xnio-api</artifactId>



      <version>3.0.3.GA</version>


      </dependency>


      <dependency>



      <groupId>org.jboss.xnio</groupId>



      <artifactId>xnio-nio</artifactId>



      <version>3.0.3.GA</version>


      </dependency>


      <dependency>



      <groupId>org.jboss.sasl</groupId>



      <artifactId>jboss-sasl</artifactId>



      <version>1.0.0.Beta9</version>


      </dependency>


      <dependency>



      <groupId>org.jboss.remoting3</groupId>



      <artifactId>jboss-remoting</artifactId>



      <version>3.2.0.CR8</version>


      </dependency>


      <dependency>



      <groupId>org.jboss.marshalling</groupId>



      <artifactId>jboss-marshalling</artifactId>



      <version>1.3.4.GA</version>


      </dependency>


      <dependency>



      <groupId>org.jboss.marshalling</groupId>



      <artifactId>jboss-marshalling-river</artifactId>



      <version>1.3.4.GA</version>


      </dependency>


      <dependency>



      <groupId>org.jboss</groupId>



      <artifactId>jboss-ejb-client</artifactId>



      <version>1.0.0.Beta11</version>


      </dependency>


      <dependency>



      <groupId>org.jboss.as</groupId>



      <artifactId>jboss-as-controller-client</artifactId>



      <version>7.0.2.Final</version>


      </dependency>

       

       

       

      the file jboss-ejb-client.properties  is under java sources since it is a web project :

       

      remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

      remote.connections=default

      remote.connection.default.host=localhost

      remote.connection.default.port = 4447

      remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

       

       

       

       

      /***********************************************/

      ejb:/MyMavenWebpp//HelloWorldBean!com.ibytecode.business.HelloWorld

      avr. 05, 2012 10:02:13 AM org.jboss.ejb.client.EJBClient <clinit>

      INFO: JBoss EJB Client version 1.0.0.Beta11

      Exception in thread "main" java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:MyMavenWebpp,distinctname:] combination

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

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

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

                at $Proxy0.sayHello(Unknown Source)

                at com.ibytecode.client.EJBApplicationClient.main(EJBApplicationClient.java:14)

        • 1. Re: No EJB receiver available for handling [appName:,modulename:MyMavenWebpp,distinctname:] combination
          prasad.deshpande

          INFO: JBoss EJB Client version 1.0.0.Beta11

          Exception in thread "main" java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:MyMavenWebpp,distinctname:] combination

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

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

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

                    at $Proxy0.sayHello(Unknown Source)

                    at com.ibytecode.client.EJBApplicationClient.main(EJBApplicationClient.java:14)

          It's most probably "jboss-ejb-client.properties" file missing from client classpath.. could you please check? Also, have look at https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI

          • 2. Re: No EJB receiver available for handling [appName:,modulename:MyMavenWebpp,distinctname:] combination
            ous2k

            the same properties file with same example is running with ejbModule project and non maven project

            the question where is the right place to put it in a web project ?

            • 3. Re: No EJB receiver available for handling [appName:,modulename:MyMavenWebpp,distinctname:] combination
              aneh

              I have read as many responses to this problem as I could find and am no closer to the answer.

               

              All of the responses say that it likely the jboss-ejb-client.properties is no in the class path.  I have the same content for default as shown above, and I know it is in the class path because when I change the port to anything other than 4447 I receive a different error messsage wwhich includes my new invalid port number so I know the properties file is being found and read.

               

              My simple client is able to connect and retrieve the stateless session bean from the server but as soon as I invoke a method on this bean I get the stack dump shown below.  So where to next?  Clearly this is not a classpath issue so what else should I check, do, or tweak?

               

              Oh yeah running on windows, via eclipse indigo, and 7.1.1.Final

               

              {remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false, remote.connection.default.port=4447, remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false, remote.connection.default.host=localhost, remote.connections=default}

              23/04/2012 1:34:36 PM org.jboss.ejb.client.EJBClient <clinit>

              INFO: JBoss EJB Client version 1.0.5.Final

              manager=Proxy for remote EJB StatelessEJBLocator{appName='', moduleName='com.istana.schedule.product.ear', distinctName='com.istana.schedule.feature.ejb', beanName='EjbManager', view='interface com.istana.schedule.feature.Manager'}

              23/04/2012 1:34:36 PM org.xnio.Xnio <clinit>

              INFO: XNIO Version 3.0.3.GA

              23/04/2012 1:34:36 PM org.xnio.nio.NioXnio <clinit>

              INFO: XNIO NIO Implementation Version 3.0.3.GA

              23/04/2012 1:34:36 PM org.jboss.remoting3.EndpointImpl <clinit>

              INFO: JBoss Remoting version 3.2.3.GA

              23/04/2012 1:34:37 PM org.jboss.ejb.client.remoting.VersionReceiver handleMessage

              INFO: Received server version 1 and marshalling strategies [river]

              23/04/2012 1:34:37 PM org.jboss.ejb.client.remoting.ChannelAssociation$ResponseReceiver handleMessage

              WARN: Unsupported message received with header 0xffffffff

              23/04/2012 1:34:37 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate

              INFO: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@16ba5c7a, receiver=Remoting connection EJB receiver [connection=Remoting connection <7632efa7>,channel=jboss.ejb,nodename=user-pc]} on channel Channel ID fd260226 (outbound) of Remoting connection 24148662 to localhost/127.0.0.1:4447

              Exception in thread "main" java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:com.istana.schedule.product.ear,distinctname:com.istana.schedule.feature.ejb] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@39cf4a2c

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

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

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

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

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

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

                  at $Proxy0.getFacilitys(Unknown Source)

                  at com.istana.schedule.session.jee.JeeManager.getFacilitys(JeeManager.java:51)

                  at com.istana.schedule.session.sui.Main.main(Main.java:195)

              • 4. Re: No EJB receiver available for handling [appName:,modulename:MyMavenWebpp,distinctname:] combination
                jaikiran

                jeff lowcock wrote:

                 

                EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@16ba5c7a, receiver=Remoting connection EJB receiver [connection=Remoting connection <7632efa7>,channel=jboss.ejb,nodename=user-pc]} on channel Channel ID fd260226 (outbound) of Remoting connection 24148662 to localhost/127.0.0.1:4447

                Exception in thread "main" java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:com.istana.schedule.product.ear,distinctname:com.istana.schedule.feature.ejb] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@39cf4a2c

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

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

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

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

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

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

                    at $Proxy0.getFacilitys(Unknown Source)

                    at com.istana.schedule.session.jee.JeeManager.getFacilitys(JeeManager.java:51)

                    at com.istana.schedule.session.sui.Main.main(Main.java:195)

                In your case, it looks like you got the appname/modulename/distinctname/beanName!interfaceName combination wrong. What does the server side log show on the console while your beans are being deployed? What JNDI names get printed out there?

                • 5. Re: No EJB receiver available for handling [appName:,modulename:MyMavenWebpp,distinctname:] combination
                  aneh

                  Here is the log from the server deploymeny

                   

                  java:global/com.istana.schedule.product.ear/com.istana.schedule.feature.ejb/EjbManager!com.istana.schedule.feature.Manager
                  java:app/com.istana.schedule.feature.ejb/EjbManager!com.istana.schedule.feature.Manager
                  java:module/EjbManager!com.istana.schedule.feature.Manager
                  java:jboss/exported/com.istana.schedule.product.ear/com.istana.schedule.feature.ejb/EjbManager!com.istana.schedule.feature.Manager
                  java:global/com.istana.schedule.product.ear/com.istana.schedule.feature.ejb/EjbManager
                  java:app/com.istana.schedule.feature.ejb/EjbManager
                  java:module/EjbManager

                   

                  This is the jndi name I use to look up the EJB

                   

                  m_manager = (Manager) context.lookup("ejb:/com.istana.schedule.product.ear/com.istana.schedule.feature.ejb/EjbManager!com.istana.schedule.feature.Manager");

                   

                  So when you say that I have got the various name components incorrect the only place I can see that this is possible is in the jndi lookup - which implies to me that I have used an incorrect jndi name for my purpose  if so which is the correct name to use?

                   

                  PS: so grateful that you have replied in such a timely manner

                  • 6. Re: No EJB receiver available for handling [appName:,modulename:MyMavenWebpp,distinctname:] combination
                    jaikiran

                    The lookup string should be :

                     

                    ejb:com.istana.schedule.product.ear/com.istana.schedule.feature.ejb//EjbManager!com.istana.schedule.feature.Manager

                     

                    Note the difference between this one and the one you posted. The jndi name is formed of ejb:app-name/module-name/distinctname/beanName!interfaceName.

                    • 7. Re: No EJB receiver available for handling [appName:,modulename:MyMavenWebpp,distinctname:] combination
                      aneh

                      Thank you for your keen eyes.  I made the change and it works (of course).  So onward through the fog.