6 Replies Latest reply on Feb 17, 2014 3:35 AM by Wolf-Dieter Fink

    No EJB receiver available for handling

    can kesen Newbie

      Hi,

      I am trying to conect to a remote ejb  on my local JBoss 7.2 from an executable java app (local not on Jboss).

      But i get the following error/Exception :

       

       

      0
      3[main] INFO  com.ris.client.PACSServiceTest  - ejb:xx-xx/xx-xx-business-impl//TestServiceBean!com.xx.business.api.TestService

      59   [main] INFO  org.jboss.ejb.client  - JBoss EJB Client version 1.0.16.Final

      122  [main] INFO  org.xnio  - XNIO Version 3.0.7.GA

      127  [main] INFO  org.xnio.nio  - XNIO NIO Implementation Version 3.0.7.GA

      139  [main] INFO  org.jboss.remoting  - JBoss Remoting version 3.2.14.GA

      362  [Remoting "config-based-ejb-client-endpoint" read-1] ERROR org.jboss.remoting.remote.connection  - JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

      365  [main] WARN  org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector  - Could not register a EJB receiver for connection to localhost:4447

      java.lang.RuntimeException: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

          at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:91)

          at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:148)

          at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.<init>(ConfigBasedEJBClientContextSelector.java:105)

          at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.<init>(ConfigBasedEJBClientContextSelector.java:73)

          at org.jboss.ejb.client.EJBClientContext.<clinit>(EJBClientContext.java:81)

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

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

          at com.sun.proxy.$Proxy0.getX(Unknown Source)

          at com...ris.client.PACSServiceTest.main(PACSServiceTest.java:71)

      Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

          at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:382)

          at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:225)

          at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)

          at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)

          at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)

          at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)

          at org.xnio.nio.NioHandle.run(NioHandle.java:90)

          at org.xnio.nio.WorkerThread.run(WorkerThread.java:187)

          at ...asynchronous invocation...(Unknown Source)

          at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270)

          at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:386)

          at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:151)

          at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:132)

          at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:146)

          ... 7 more

      383  [Remoting "config-based-ejb-client-endpoint" read-1] ERROR org.jboss.remoting.remote.connection  - JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

      java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:xx-xx, moduleName:xx-xx-business-impl, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@14bc02d

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

          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.doInvoke(EJBInvocationHandler.java:177)

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

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

          at com.sun.proxy.$Proxy0.getX(Unknown Source)

          at com...ris.client.PACSServiceTest.main(PACSServiceTest.java:71)

       

      The test remote bean TestService and its implmentationis in an .ear

       

      Server Classes :

      @Remote
      public interface TestService {
      
          public int getX();
      
      }
      
      
      @Stateless
      @Remote(TestService.class)
      public class TestServiceBean implements TestService{
      
          /* (non-Javadoc)
           * @see com.xx.xx.dicom.business.api.TestService#getX()
           */
          @Override
          public int getX() {
              // TODO Auto-generated method stub
              return 1111;
          }
      
      }
      
      
      

       

      Client code :

       

        final Hashtable jndiProperties = new Hashtable();
                  jndiProperties.put(Context.URL_PKG_PREFIXES,
                          "org.jboss.ejb.client.naming");
             
             
             
                  String jndiName = "ejb:xx-dicom/xx-xx-business-impl//TestServiceBean!"
                          + TestService.class.getName();
                  logger.info(jndiName);
             
                  final Context context = new InitialContext(jndiProperties);
                  TestService service = (TestService) context
                          .lookup(jndiName);
      
                 logger.info(service.getX());
      
      
      

       

       

      jboss-ejb-client.properties

      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
      remote.connection.default.username=ARZT RAD
      remote.connection.default.password=a
      
      
      

       

       

      client dependencies :

       

       

       

      Any ideas ? Thanks in advance!