Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-9017

Wildfly naming client can't invoke EJBs on EAP 7.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.1.0.DR17
    • 7.1.0.DR12, 7.1.0.DR16
    • EJB, Naming
    • None
    • Regression, Blocks Testing

      InitialContext backed by Wildfly Naming Client like this:

      Properties env = new Properties();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory"");
      env.put(Context.PROVIDER_URL, "http-remoting://127.0.0.1:8080");
      env.put("jboss.naming.client.ejb.context", "true");
      env.put(Context.SECURITY_PRINCIPAL, "joe");
      env.put(Context.SECURITY_CREDENTIALS, "joeIsAwesome2013!");
      InitialContext ctx = new InitialContext(env);
      

      lookup name for the EJB is /server/HelloBean!ejb.HelloBeanRemote (or without the slash at the beginning, I tried both)

      This works for invoking EJBs on EAP 7.1, but when the same is attempted against EAP 7.0, you get:

      Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000024: Not able to find EJB matching "StatelessEJBLocator for "/server/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None"
      	at org.jboss.ejb.client.EJBClientContext.discoverAffinityNone(EJBClientContext.java:405)
      	at org.jboss.ejb.client.EJBClientContext.performLocatedAction(EJBClientContext.java:387)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:150)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:100)
      	at com.sun.proxy.$Proxy2.hello(Unknown Source)
      	at client.Client.main(Client.java:20)
      

      Reproducer attached.

            sdouglas1@redhat.com Stuart Douglas
            jmartisk@redhat.com Jan Martiska
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: