1 2 Previous Next 24 Replies Latest reply on May 23, 2014 11:09 AM by carlos andres chaguendo Branched to a new discussion.

    Remote EJB Client access

    bate Newbie

      I have the following ejb :

      package  org.jboss.as.quickstarts.kitchensink_ear.controller;

       

       

      import javax.ejb.Remote;

      import javax.enterprise.context.Dependent;

      import java.io.Serializable;

       

      @Remote

      public interface DAO <T, PK extends Serializable> {

           T create(T t);

          T read(Class<T>entityClass , PK id);

          T update(T t);

          void delete(T t);

      }

       

      package org.jboss.as.quickstarts.kitchensink_ear.controller;

        import java.io.Serializable;

        import javax.ejb.Stateless;

      import javax.persistence.EntityManager;

      import javax.persistence.PersistenceContext;

      import org.jboss.as.quickstarts.kitchensink_ear.model.Masterfile;

       

      @Stateless

        public class GenericControllerImpl<T, PK extends Serializable>  implements DAO<T, PK> {

            @PersistenceContext

          protected EntityManager entityManager;

           @Override

          public T create(T t) {

              this.entityManager.persist(t);

              return t;

          }

       

       

          @Override

          public T read(Class<T>entityClass, PK id) {

                     T xx=this.entityManager.find(entityClass, id);

                return xx;

       

          }

       

       

          @Override

          public T update(T t) {

              return this.entityManager.merge(t);

          }

       

       

          @Override

          public void delete(T t) {

              t = this.entityManager.merge(t);

              this.entityManager.remove(t);

            }

      }

       

      and the client:

       

      public class Client_ear {

          public static void main(String[] args) throws Exception{

                              Properties jndiProperties = new Properties();;

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

                          final Context context = new InitialContext(jndiProperties);

      DAO<Producer,String> dao = (DAO<Producer,String>)context.lookup("ejb:/jboss-as-kitchensink_ear//GenericControllerImpl!org.jboss.as.quickstarts.kitchensink_ear.controller.DAO");

                Producer producer = new Producer("111", "Produzent1 ");

                           IAddress baddress =new Address(producer,"xx","yy","BIE","DE","1");

                           IAddress daddress =new Address(producer,"xx","yy","BIE","DE","1");

                           IAddress address =new Address(producer,"xx","yy","BIE","DE","1");

                         

                           producer.setHomeAddress(address);

                           producer.setDeliveryAddress(daddress);

                           producer.setBillingAddress(baddress);

                  dao.create(producer);

          }

      }

       

      when i run this client

      i get the following error:

       

      15.02.2012 22:26:24 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:jboss-as-kitchensink_ear,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.create(Unknown Source)

                at org.jboss.as.quickstarts.kitchensink_ear.test.Client_ear.main(Client_ear.java:55)

      what 's wrong?

      Thank you for your help

        • 1. Re: Remote EJB Client access
          bate Newbie

          sorry. i forgot to say that i am using JBoss-as-7.1.0.CR1b.

          I started the standalone  with:

          C:\iws\jboss\jboss-as-7.1.0.CR1b\bin\standalone.bat --server-config=standalone-full.xml

           

          i  well know and had a look at all kown Link about this issue:

          https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI

          https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDIthey all did not help . The exception remains:

           

          In the log  is the following printed:

           

           

          21:29:41,160 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread1-5) JNDI bindings for session bean named GenericControllerImpl in deployment unit deployment "jboss-as-kitchensink-ear.jar" are as follows:

                  java:global/jboss-as-kitchensink-ear/GenericControllerImpl!org.jboss.as.quickstarts.kitchensink_ear.controller.DAO

                  java:app/jboss-as-kitchensink-ear/GenericControllerImpl!org.jboss.as.quickstarts.kitchensink_ear.controller.DAO

                  java:module/GenericControllerImpl!org.jboss.as.quickstarts.kitchensink_ear.controller.DAO

                  java:global/jboss-as-kitchensink-ear/GenericControllerImpl

                  java:app/jboss-as-kitchensink-ear/GenericControllerImpl

                  java:module/GenericControllerImpl

          • 2. Re: Remote EJB Client access
            jaikiran pai Master

            You seem to be missing jboss-ejb-client.properties from the client classpath.

            • 3. Re: Remote EJB Client access
              Dejan Kitic Newbie

              I am confused now, do we need jboss-ejb-client.properties file now on classpath, or do we need jboss-ejb-client.xml in top level deployment META-INF? I 've been testing this all day yesterday on lastest build (before release came out), with .war containing jboss-ejb-client.xml in META-INF, WEB-INF, WEB-INF/classes and none seem to work, from your answers I concluded that jboss-ejb-client.xml is not picked up (thread from forum).

              Exception is :

              java.lang.IllegalArgumentException: Could not find module app: ejbexample module: ejbexamplejar distinct name:

               

              Also worth of noting, security related configuration from 7.1 documentation regarding invocation of EJB deployed on remote server is out of date

               

              /subsystem=remoting/remote-outbound-connection=remote-ejb-connection:add(outbound-socket-binding-ref=remote-ejb, connection-creation-options={"SASL_POLICY_NOANONYMOUS" => "false", "SSL_ENABLED" => "false"}

               

              connection-creation-options={"SASL_POLICY_NOANONYMOUS" => "false", "SSL_ENABLED" => "false"} no longer exists, properties that are allowed now are

              security-realm, username.

              I 've gotten arround it by disabling it.

               

              So *.properties file or *.xml file and where to place it? Maybe simple example of *.properties file if thats the right way to go?

               

              Regards,

              DJ

              • 4. Re: Remote EJB Client access
                Prasad Deshpande Expert

                I am confused now, do we need jboss-ejb-client.properties file now on classpath, or do we need jboss-ejb-client.xml in top level deployment META-INF?

                As far as I know, it's surely jboss-ejb-client.properties for standalone remote clients.

                 

                So *.properties file or *.xml file and where to place it?

                 

                As Jaikiran said, you need jboss-ejb-client.properties in you client classpath. You can package this jboss-ejb-client.properties in any of the jar that is in client classpath at root level of the jar

                • 5. Re: Remote EJB Client access
                  Dejan Kitic Newbie

                  Just to clarify, I am invoking EJB deployed on remote server (ear), from another JB7 instance (client deplyed as war), not standalone client. So I need to place jboss-ejb-client.properties in WEB-INF/classes and do the configuration from documentation

                  regarding setup of outbound-socket-binding and remote-outbound-connection ?

                  I have tried the same example on Final 7.1 no difference.

                  • 6. Re: Remote EJB Client access
                    Prasad Deshpande Expert

                    OK, the links you posted earlier gave impression that you are trying from standalone remote client... I think this is what you need, https://docs.jboss.org/author/display/AS71/Developer+Guide#DeveloperGuide-EJBinvocationsfromaremoteserver

                    • 7. Re: Remote EJB Client access
                      Dejan Kitic Newbie

                      Sorry for confusion... That 's where I got all the info, sadly it doesn't work. To explain bit more about setup, I have ear with jar deployed on "destination" server, containg just one stateless bean, and on "client" server I have war with rest that should invoke remote ejb. I do have jboss-ejb-client.xml (tried in WEB-INF, WEB-INF/classes, META-INF). I 've disabled security to keep it simple.

                      Lookup and invocation code:

                      @GET

                          @Path("/testRemoteEjbInvocation")

                          public String testRemoteEjbInvocation(@QueryParam("message") String message)

                          {

                              log.info("testRemoteEjbInvocation called with message=[{}]", new Object[] {message});

                              try

                              {

                                  final Hashtable<String, String> props = new Hashtable();

                                  // setup the ejb: namespace URL factory

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

                                  // create the InitialContext

                                  final Context context = new javax.naming.InitialContext(props);

                                 GreeterSrvc greaterBean = (GreeterSrvc)

                                          context.lookup("ejb:ejbexample/ejbexample-jar//GreeterSrvcImpl!org.jbossas7.ejb.example.ejb.beans.GreeterSrvc");

                       

                                  greaterBean.greetMe(message);

                                  return "OK";

                              }

                              catch(Exception e)

                              {

                                  e.printStackTrace();

                                  return e.getMessage();

                              }

                      }

                      ear deployed on remote instance is ejbexample.ear, inside its ejbexample-jar.jar, GreeterSrvcImpl is implementation and GreeterSrvc is remote interface.

                      context.lookup line is fine, its method invocation that s failing with exception i mentioned above. Earlier posts from jakiran suggest that jboss-ejb-client.xml is not picked up, no matter where I 've placed it, META-INF or WEB-INF or WEB-INF/classses. Only thing left is to try to place it in the same package where lookup code is, but i suspect it wont make a difference.

                      Same issue happens both with Final-SNAPSHOT from yesterday and 7.1 Final Release.

                      • 8. Re: Remote EJB Client access
                        jaikiran pai Master

                        Dejan Kitic wrote:

                         

                        and on "client" server I have war with rest that should invoke remote ejb. I do have jboss-ejb-client.xml (tried in WEB-INF, WEB-INF/classes, META-INF).

                        It should be located at .war/WEB-INF/jboss-ejb-client.xml

                         

                         

                        Dejan Kitic wrote:

                         

                                            context.lookup("ejb:ejbexample/ejbexample-jar//GreeterSrvcImpl!org.jbossas7.ejb.example.ejb.beans.GreeterSrvc");

                         

                        ear deployed on remote instance is ejbexample.ear, inside its ejbexample-jar.jar, GreeterSrvcImpl is implementation and GreeterSrvc is remote interface.

                        Can you please post the "destination" server side logs which show the JNDI bindings? (Your?) original post doesn't match this.

                         

                         

                        Dejan Kitic wrote:

                         

                        context.lookup line is fine, its method invocation that s failing with exception i mentioned above.

                        Please post the entire exception stacktrace (I want to make sure it matches the code you posted here).

                        • 9. Re: Remote EJB Client access
                          Dejan Kitic Newbie

                          Client server was configured with:

                           

                          /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=remote-ejb:add(host=localhost, port=4447)

                          then:

                          /subsystem=remoting/remote-outbound-connection=remote-ejb-connection:add(outbound-socket-binding-ref=remote-ejb) since rest of params dont exist anymore

                          and finaly to remove security issue: standalone-full.xml was modified to this: (removed security-realm)

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

                                      <connector name="remoting-connector" socket-binding="remoting"/>

                          </subsystem>

                           

                          Destination server log:

                          10:08:23,823 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named GreeterSrvcImpl in deployment unit subdeployment "ejbexample-jar.jar" of deployment "ejbexample.ear" are as follows:

                           

                              java:global/ejbexample/ejbexample-jar/GreeterSrvcImpl!org.jbossas7.ejb.example.ejb.beans.GreeterSrvc

                              java:app/ejbexample-jar/GreeterSrvcImpl!org.jbossas7.ejb.example.ejb.beans.GreeterSrvc

                              java:module/GreeterSrvcImpl!org.jbossas7.ejb.example.ejb.beans.GreeterSrvc

                              java:jboss/exported/ejbexample/ejbexample-jar/GreeterSrvcImpl!org.jbossas7.ejb.example.ejb.beans.GreeterSrvc

                              java:global/ejbexample/ejbexample-jar/GreeterSrvcImpl

                              java:app/ejbexample-jar/GreeterSrvcImpl

                              java:module/GreeterSrvcImpl

                           

                          Content of jboss-ejb-client.xml (placed in WEB-INF):

                          <?xml version="1.0" encoding="UTF-8"?>

                          <jboss-ejb-client xmlns="urn:jboss:ejb-client:1.0">

                              <client-context>

                                  <ejb-receivers>

                                      <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection"/>

                                  </ejb-receivers>

                              </client-context>

                          </jboss-ejb-client>

                           

                          Stacktrace from client server:

                          10:22:37,898 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "rest_client_war.war"

                          10:22:37,982 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016002: Processing weld deployment rest_client_war.war

                          10:22:38,007 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016005: Starting Services for CDI deployment: rest_client_war.war

                          10:22:38,027 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016008: Starting weld service for deployment rest_client_war.war

                          10:22:38,241 INFO  [org.jboss.resteasy.cdi.CdiInjectorFactory] (MSC service thread 1-2) Found BeanManager at java:comp/BeanManager

                          10:22:38,246 INFO  [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /rest_client_war

                          10:22:38,258 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018565: Replaced deployment "rest_client_war.war" with deployment "rest_client_war.war"

                          10:22:46,161 INFO  [org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher] (http--127.0.0.1-8180-1) Deploying javax.ws.rs.core.Application: class org.jbossas7.rest.client.RemoteEjbRestTesterApp

                          10:22:46,164 INFO  [org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher] (http--127.0.0.1-8180-1) Adding singleton resource org.jbossas7.rest.client.RemoteEjbRestTester from Application javax.ws.rs.core.Application

                          10:22:46,185 INFO  [org.jbossas7.rest.client.RemoteEjbRestTester] (http--127.0.0.1-8180-1) testRemoteEjbInvocation called with message=[HelloWorld]

                          10:22:46,188 ERROR [stderr] (http--127.0.0.1-8180-1) java.lang.IllegalArgumentException: Could not find module app: ejbexample module: ejbexample-jar distinct name:

                          10:22:46,189 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.as.ejb3.remote.LocalEjbReceiver.findBean(LocalEjbReceiver.java:274)

                          10:22:46,190 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:109)

                          10:22:46,194 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:173)

                          10:22:46,195 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)

                          10:22:46,196 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:175)

                          10:22:46,196 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:92)

                          10:22:46,197 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:175)

                          10:22:46,197 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)

                          10:22:46,201 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)

                          10:22:46,202 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)

                          10:22:46,202 ERROR [stderr] (http--127.0.0.1-8180-1)     at $Proxy40.greetMe(Unknown Source)

                          10:22:46,203 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jbossas7.rest.client.RemoteEjbRestTester.testRemoteEjbInvocation(RemoteEjbRestTester.java:56)

                          10:22:46,203 ERROR [stderr] (http--127.0.0.1-8180-1)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                          10:22:46,205 ERROR [stderr] (http--127.0.0.1-8180-1)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                          10:22:46,211 ERROR [stderr] (http--127.0.0.1-8180-1)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                          10:22:46,212 ERROR [stderr] (http--127.0.0.1-8180-1)     at java.lang.reflect.Method.invoke(Method.java:597)

                          10:22:46,212 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)

                          10:22:46,215 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)

                          10:22:46,216 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)

                          10:22:46,216 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)

                          10:22:46,217 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)

                          10:22:46,218 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)

                          10:22:46,218 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

                          10:22:46,227 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

                          10:22:46,236 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

                          10:22:46,236 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

                          10:22:46,237 ERROR [stderr] (http--127.0.0.1-8180-1)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                          10:22:46,237 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                          10:22:46,238 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                          10:22:46,239 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

                          10:22:46,240 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                          10:22:46,241 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                          10:22:46,242 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                          10:22:46,243 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                          10:22:46,250 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154)

                          10:22:46,251 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                          10:22:46,252 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                          10:22:46,252 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                          10:22:46,253 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

                          10:22:46,253 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                          10:22:46,254 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                          10:22:46,255 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                          10:22:46,257 ERROR [stderr] (http--127.0.0.1-8180-1)     at java.lang.Thread.run(Thread.java:662)

                           

                          Regards,

                          DJ

                          • 10. Re: Remote EJB Client access
                            jaikiran pai Master

                            org.jboss.as.ejb3.remote.LocalEjbReceiver.findBean(LocalEjbReceiver.java:274)

                            10:22:46,190 ERROR [stderr] (http--127.0.0.1-8180-1)     at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:109)

                            At first glance this doesn't look right. It's trying to find the bean on the same server instance as the client. Obviously it won't find it. The most likely issue is that the jboss-ejb-client.xml isn't being picked up. Can you post the output of:

                             

                            jar -tf rest_client_war.war

                            • 11. Re: Remote EJB Client access
                              Dejan Kitic Newbie

                              That's what I 've been saying all along, here it is: (ejbexample-api-1.0-SNAPSHOT.jar is emtpy, you can ignore that one)

                              dejan@natty:~/Programiranje/eclipse-workspaces/jboss7/rest_ejb31_client/rest_client_war/target$ jar -tf rest_client_war.war

                              META-INF/

                              META-INF/MANIFEST.MF

                              WEB-INF/

                              WEB-INF/lib/

                              WEB-INF/classes/

                              WEB-INF/classes/org/

                              WEB-INF/classes/org/jbossas7/

                              WEB-INF/classes/org/jbossas7/rest/

                              WEB-INF/classes/org/jbossas7/rest/client/

                              WEB-INF/web.xml

                              WEB-INF/lib/ejbexample-api-1.0-SNAPSHOT.jar

                              WEB-INF/lib/ejbexample-jar-1.0-SNAPSHOT-client.jar

                              WEB-INF/classes/org/jbossas7/rest/client/RemoteEjbRestTesterApp.class

                              WEB-INF/classes/org/jbossas7/rest/client/RemoteEjbRestTester.class

                              WEB-INF/jboss-ejb-client.xml

                              META-INF/maven/

                              META-INF/maven/org.jbossas7.ejb31.examples.client/

                              META-INF/maven/org.jbossas7.ejb31.examples.client/rest_client_war/

                              META-INF/maven/org.jbossas7.ejb31.examples.client/rest_client_war/pom.xml

                              META-INF/maven/org.jbossas7.ejb31.examples.client/rest_client_war/pom.properties

                              dejan@natty:~/Programiranje/eclipse-workspaces/jboss7/rest_ejb31_client/rest_client_war/target$

                               

                              Contents of WEB-INF/lib:

                              dejan@natty:~/Programiranje/eclipse-workspaces/jboss7/rest_ejb31_client/rest_client_war/target/rest_client_war-0.0.1-SNAPSHOT/WEB-INF/lib$ jar -tf ejbexample-api-1.0-SNAPSHOT.jar

                              META-INF/

                              META-INF/MANIFEST.MF

                              META-INF/maven/

                              META-INF/maven/org.jboss7.ejb31.examples/

                              META-INF/maven/org.jboss7.ejb31.examples/ejbexample-api/

                              META-INF/maven/org.jboss7.ejb31.examples/ejbexample-api/pom.xml

                              META-INF/maven/org.jboss7.ejb31.examples/ejbexample-api/pom.properties

                              dejan@natty:~/Programiranje/eclipse-workspaces/jboss7/rest_ejb31_client/rest_client_war/target/rest_client_war-0.0.1-SNAPSHOT/WEB-INF/lib$ jar -tf ejbexample-jar-1.0-SNAPSHOT-client.jar

                              META-INF/

                              META-INF/MANIFEST.MF

                              org/

                              org/jbossas7/

                              org/jbossas7/ejb/

                              org/jbossas7/ejb/example/

                              org/jbossas7/ejb/example/ejb/

                              org/jbossas7/ejb/example/ejb/beans/

                              org/jbossas7/ejb/example/ejb/beans/impl/

                              org/jbossas7/ejb/example/ejb/beans/GreeterSrvc.class

                              META-INF/beans.xml

                              META-INF/maven/

                              META-INF/maven/org.jboss7.ejb31.examples/

                              META-INF/maven/org.jboss7.ejb31.examples/ejbexample-jar/

                              META-INF/maven/org.jboss7.ejb31.examples/ejbexample-jar/pom.xml

                              META-INF/maven/org.jboss7.ejb31.examples/ejbexample-jar/pom.properties

                              dejan@natty:~/Programiranje/eclipse-workspaces/jboss7/rest_ejb31_client/rest_client_war/target/rest_client_war-0.0.1-SNAPSHOT/WEB-INF/lib$

                              • 12. Re: Remote EJB Client access
                                jaikiran pai Master

                                Dejan Kitic wrote:

                                 

                                That's what I 've been saying all along,

                                Yeah, I know Just trying to gather the relevant details to make sure we aren't missing anything.

                                 

                                 

                                Dejan Kitic wrote:

                                 

                                 

                                WEB-INF/jboss-ejb-client.xml

                                Looks fine. That just leaves us with the other option - can you enable TRACE level logging of org.jboss.as.ee package and gets the logs when this application is being deployed?

                                • 13. Re: Remote EJB Client access
                                  Dejan Kitic Newbie

                                  Okidoki, one hot baked trace level comming up in a sec.

                                  • 14. Re: Remote EJB Client access
                                    Dejan Kitic Newbie

                                    11:31:49,415 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "rest_client_war.war"

                                    11:31:49,503 DEBUG [org.jboss.as.ee.structure.EJBClientDescriptorParsingProcessor] (MSC service thread 1-2) Successfully parsed jboss-ejb-client.xml for deploy

                                    ment unit deployment "rest_client_war.war"

                                    11:31:50,540 INFO  [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002: Processing weld deployment rest_client_war.war

                                    11:31:50,644 DEBUG [org.jboss.as.ee] (MSC service thread 1-3) Configuring component class: javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV named javax.servlet.j

                                    sp.jstl.tlv.PermittedTaglibsTLV

                                    11:31:50,676 DEBUG [org.jboss.as.ee] (MSC service thread 1-3) Configuring component class: org.apache.catalina.servlets.DefaultServlet named org.apache.catalin

                                    a.servlets.DefaultServlet

                                    11:31:50,679 DEBUG [org.jboss.as.ee] (MSC service thread 1-3) Configuring component class: javax.faces.webapp.FacetTag named javax.faces.webapp.FacetTag

                                    11:31:50,680 DEBUG [org.jboss.as.ee] (MSC service thread 1-3) Configuring component class: org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher name

                                    d org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher

                                    11:31:50,683 DEBUG [org.jboss.as.ee] (MSC service thread 1-3) Configuring component class: org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap named or

                                    g.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap

                                    11:31:50,687 DEBUG [org.jboss.as.ee] (MSC service thread 1-3) Configuring component class: com.sun.faces.config.ConfigureListener named com.sun.faces.config.Co

                                    nfigureListener

                                    11:31:50,701 DEBUG [org.jboss.as.ee] (MSC service thread 1-3) Configuring component class: javax.servlet.jsp.jstl.tlv.ScriptFreeTLV named javax.servlet.jsp.jst

                                    l.tlv.ScriptFreeTLV

                                    11:31:50,706 DEBUG [org.jboss.as.ee] (MSC service thread 1-3) Configuring component class: org.jboss.as.weld.webtier.jsp.JspInitializationListener named org.jb

                                    oss.as.weld.webtier.jsp.JspInitializationListener

                                    11:31:50,713 DEBUG [org.jboss.as.ee] (MSC service thread 1-3) Configuring component class: org.apache.jasper.servlet.JspServlet named org.apache.jasper.servlet

                                    .JspServlet

                                    11:31:50,726 TRACE [org.jboss.as.ee] (MSC service thread 1-3) Installing component javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV

                                    11:31:50,738 TRACE [org.jboss.as.ee] (MSC service thread 1-3) Installing component org.apache.catalina.servlets.DefaultServlet

                                    11:31:50,741 TRACE [org.jboss.as.ee] (MSC service thread 1-3) Installing component javax.faces.webapp.FacetTag

                                    11:31:50,745 TRACE [org.jboss.as.ee] (MSC service thread 1-3) Installing component org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher

                                    11:31:50,747 TRACE [org.jboss.as.ee] (MSC service thread 1-3) Installing component org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap

                                    11:31:50,767 TRACE [org.jboss.as.ee] (MSC service thread 1-3) Installing component com.sun.faces.config.ConfigureListener

                                    11:31:50,768 TRACE [org.jboss.as.ee] (MSC service thread 1-3) Installing component javax.servlet.jsp.jstl.tlv.ScriptFreeTLV

                                    11:31:50,769 TRACE [org.jboss.as.ee] (MSC service thread 1-3) Installing component org.jboss.as.weld.webtier.jsp.JspInitializationListener

                                    11:31:50,770 TRACE [org.jboss.as.ee] (MSC service thread 1-3) Installing component org.apache.jasper.servlet.JspServlet

                                    11:31:50,869 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016005: Starting Services for CDI deployment: rest_client_war.war

                                    11:31:50,968 INFO  [org.jboss.weld.Version] (MSC service thread 1-3) WELD-000900 1.1.5 (AS71)

                                    11:31:51,079 INFO  [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016008: Starting weld service for deployment rest_client_war.war

                                    11:31:52,914 INFO  [org.jboss.resteasy.cdi.CdiInjectorFactory] (MSC service thread 1-1) Found BeanManager at java:comp/BeanManager

                                    11:31:53,060 INFO  [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /rest_client_war

                                    11:31:53,161 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "rest_client_war.war"

                                    11:32:24,755 INFO  [org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher] (http--127.0.0.1-8180-1) Deploying javax.ws.rs.core.Application: clas

                                    s org.jbossas7.rest.client.RemoteEjbRestTesterApp

                                    11:32:24,762 INFO  [org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher] (http--127.0.0.1-8180-1) Adding singleton resource org.jbossas7.rest.

                                    client.RemoteEjbRestTester from Application javax.ws.rs.core.Application

                                    11:32:24,829 INFO  [org.jbossas7.rest.client.RemoteEjbRestTester] (http--127.0.0.1-8180-1) testRemoteEjbInvocation called with message=[HelloWorld]

                                    11:32:24,846 INFO  [org.jboss.ejb.client] (http--127.0.0.1-8180-1) JBoss EJB Client version 1.0.2.Final

                                    11:32:24,856 ERROR [stderr] (http--127.0.0.1-8180-1) java.lang.IllegalArgumentException: Could not find module app: ejbexample module: ejbexample-jar distinct name:

                                    11:32:24,857 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.as.ejb3.remote.LocalEjbReceiver.findBean(LocalEjbReceiver.java:274)

                                    11:32:24,858 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:109)

                                    11:32:24,859 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:173)

                                    11:32:24,860 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)

                                    11:32:24,860 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:175)

                                    11:32:24,861 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:92)

                                    11:32:24,862 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:175)

                                    11:32:24,863 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)

                                    11:32:24,870 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)

                                    11:32:24,873 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)

                                    11:32:24,874 ERROR [stderr] (http--127.0.0.1-8180-1)    at $Proxy38.greetMe(Unknown Source)

                                    11:32:24,875 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jbossas7.rest.client.RemoteEjbRestTester.testRemoteEjbInvocation(RemoteEjbRestTester.java:56)

                                    11:32:24,877 ERROR [stderr] (http--127.0.0.1-8180-1)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                                    11:32:24,878 ERROR [stderr] (http--127.0.0.1-8180-1)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                                    11:32:24,879 ERROR [stderr] (http--127.0.0.1-8180-1)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                                    11:32:24,880 ERROR [stderr] (http--127.0.0.1-8180-1)    at java.lang.reflect.Method.invoke(Method.java:597)

                                    11:32:24,880 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)

                                    11:32:24,881 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)

                                    11:32:24,882 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)

                                    11:32:24,883 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)

                                    11:32:24,885 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)

                                    11:32:24,886 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)

                                    11:32:24,887 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

                                    11:32:24,888 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

                                    11:32:24,889 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

                                    11:32:24,893 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

                                    11:32:24,893 ERROR [stderr] (http--127.0.0.1-8180-1)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                                    11:32:24,894 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                                    11:32:24,895 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                                    11:32:24,895 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

                                    11:32:24,896 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                                    11:32:24,897 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                                    11:32:24,897 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                                    11:32:24,898 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                                    11:32:24,898 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154)

                                    11:32:24,903 ERROR [stderr] (http--127.0.0.1-8180-1)    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                                    11:32:24,903 ERROR [stderr] (http--127.0.0.1-8180-1)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                                    11:32:24,904 ERROR [stderr] (http--127.0.0.1-8180-1)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                                    11:32:24,907 ERROR [stderr] (http--127.0.0.1-8180-1)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
                                    11:32:24,907 ERROR [stderr] (http--127.0.0.1-8180-1)at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
                                    11:32:24,908 ERROR [stderr] (http--127.0.0.1-8180-1)at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
                                    11:32:24,910 ERROR [stderr] (http--127.0.0.1-8180-1)at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
                                    11:32:24,910 ERROR [stderr] (http--127.0.0.1-8180-1)at java.lang.Thread.run(Thread.java:662)
                                    1 2 Previous Next