0 Replies Latest reply on Feb 2, 2018 1:51 AM by min huang

    The prefix ejb: issue for remote ejb client call when starting JBoss eap 7.1

    min huang Newbie

      Hi all,

       

      Currently i have faced the ejb client call issue on JBoss eap7.1, but this issue cannot be found on 7.0, i really don't know what's the root cause on 7.1, i have took 3 days on this issue but nothing found,

      and can any expert to help me to take a look at it? i'm really appreciate to your help!

      Below is my issue description:

       

      I deployed the client ejb and server ejb into one JBoss 7.1(one jvm), when i start JBoss, the NoSuchEJBException is thrown on log as below(there is no error on JBoss7.0):

      ...................

      Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [xxxxx.xxxx..xxxxPermissionEvaluator]: Constructor threw exception; nested exception is javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "xxxxx-ejb-ear/security-maintenance-ejb/DomainObjectServiceBean", view is interface xxxxxx.xxxxx.security.service.DomainObjectService, affinity is None

        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)

        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:108)

        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280)

        ... 93 more

      Caused by: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "security-maintenance-ejb-ear/security-maintenance-ejb/DomainObjectServiceBean", view is interface xxxxx.xxxxxxx.security.service.DomainObjectService, affinity is None

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:567)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)

        at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)

        at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:133)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)

        at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:108)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)

        at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:78)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)

      ...........

       

      the client ejb call code is on below:

      @EJB(mappedName = "ejb:security-maintenance-ejb-ear/security-maintenance-ejb/DomainObjectServiceBean!xxxxxx..security.service.DomainObjectService")
      DomainObjectService domainObjectService;

       

      The server ejb has been deployed successfully on JBoss, and has published the JNDI resource as below:

      2018-02-02 13:39:34,133 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-2) WFLYEJB0473: JNDI bindings for session bean named 'DomainObjectServiceBean' in deployment unit 'subdeployment "security-maintenance-ejb.jar" of deployment "security-maintenance-ejb-ear.ear"' are as follows:

       

        java:global/security-maintenance-ejb-ear/security-maintenance-ejb/DomainObjectServiceBean!xxxxxxx.security.service.DomainObjectService

        java:app/security-maintenance-ejb/DomainObjectServiceBean!xxxxxxx.security.service.DomainObjectService

        java:module/DomainObjectServiceBean!xxxxxxx.security.service.DomainObjectService

        java:jboss/exported/security-maintenance-ejb-ear/security-maintenance-ejb/DomainObjectServiceBean!xxxxxxxx.security.service.DomainObjectService

        java:global/security-maintenance-ejb-ear/security-maintenance-ejb/DomainObjectServiceBean

        java:app/security-maintenance-ejb/DomainObjectServiceBean

        java:module/DomainObjectServiceBean

       

      This error is thrown when starting JBoss7.1, but the client ejb can be deployed and called server ejb successfully when JBoss already started, it's strange!

      also, if i change the prefix from ejb: to  java:global as below, and there is no such error thrown when starting JBoss:

      @EJB(mappedName = "java:global/security-maintenance-ejb-ear/security-maintenance-ejb/DomainObjectServiceBean!xxxxxx..security.service.DomainObjectService")

       

      So could anyone to explain why using prefix ejb: to call will be failed when starting JBoss7.1? this issue is not exist in JBoss7.0 when starting, thanks!