1 Reply Latest reply on Jun 13, 2014 4:49 AM by Radoslav Husar

    Not able to call EJB in WildFly

    raj_kumar Newbie

      Hi ,

       

      I am using WildFly 8.0.0, i have written a application to test it but not able to call the remote ejb. Below  are details :-

       

      EJB got deployed :-

       

      java:global/TestEAR/Test/HowAreYou!com.osi.HowAreYouRemote

        java:app/Test/HowAreYou!com.osi.HowAreYouRemote

        java:module/HowAreYou!com.osi.HowAreYouRemote

        java:jboss/exported/TestEAR/Test/HowAreYou!com.osi.HowAreYouRemote

        java:global/TestEAR/Test/HowAreYou!com.osi.HowAreYou

        java:app/Test/HowAreYou!com.osi.HowAreYou

        java:module/HowAreYou!com.osi.HowAreYou

       

       

      My client code :-

       

      final Hashtable jndiProperties = new Hashtable();

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

           jndiProperties.put(Context.PROVIDER_URL,"http-remoting://localhost:8080");

        jndiProperties.put("java.naming.factory.initial", "org.jboss.naming.remote.client.InitialContextFactory");

        jndiProperties.put("jboss.naming.client.ejb.context", true);

      ctx = new javax.naming.InitialContext(jndiProperties);

       

      final HowAreYouRemote beanOne =(HowAreYouRemote) ctx.lookup("ejb:TestEAR/Test//HowAreYou!com.osi.HowAreYouRemote");

      beanOne.sayHowAreYou();

       

      The Exception is :-

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

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

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

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

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

        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.sayHowAreYou(Unknown Source)

        at com.osi.HowAreYouClient.callService(HowAreYouClient.java:70)

        at com.osi.HowAreYouClient.main(HowAreYouClient.java:21)

       

      i have also tried with JNDI name "ejb:TestEAR/Test/HowAreYou!com.osi.HowAreYouRemote", but still not working. Please tell me where things are wrong?

       

      Thanks