2 Replies Latest reply on Oct 28, 2013 11:44 AM by ravipatil080

    remote-naming project for ejb invocation failing to connect to remote host after all configuration is proper

    ravipatil080

      Hi all,

      I am using jboss7.2.0.Final and I have deployed myapp.ear file and its running

       

      I have an ejb (stateless) in the service and it is exposed as

      java:jboss/myapp/mymodule/HiEjb!com.mycompany.api.HiInterfaceRemote

       

      And My look up configuration is like

            Properties jndiProps = new Properties();
           jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
           jndiProps.put(Context.PROVIDER_URL,"remote://localhost:4447");
           jndiProps.put("jboss.naming.client.ejb.context", true);
           Context ctx = new InitialContext(jndiProps);     
           ejb =  (HiInterfaceRemote) ctx.lookup("myapp/mymodule/HiEjb!com.mycompany.api.HiInterfaceRemote");
          
        

       

       

      And I have following jars in the classpath

       

      jboss-remote-naming-1.0.5.Final.jar

      xnio-nio-3.0.7.GA.jar

      jboss-ejb-api_3.1_spec-1.0.1.Final.jar

      jboss-ejb-client-1.0.0.Beta11.jar

      jboss-logging-3.1.0.CR2.jar

      jboss-marshalling-1.3.4.GA.jar

      jboss-marshalling-river-1.3.4.GA.jar

      jboss-remoting-3.2.0.CR8.jar

      jboss-sasl-1.0.0.Beta9.jar

      jboss-transaction-api_1.1_spec-1.0.0.Final.jar

      xnio-api-3.0.0.CR7.jar

       

      But still I am getting error like

       

              at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)

              at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)

              at javax.swing.JComponent.processKeyBindings(Unknown Source)

              at javax.swing.JComponent.processKeyEvent(Unknown Source)

              at java.awt.Component.processEvent(Unknown Source)

              at java.awt.Container.processEvent(Unknown Source)

              at java.awt.Component.dispatchEventImpl(Unknown Source)

              at java.awt.Container.dispatchEventImpl(Unknown Source)

              at java.awt.Component.dispatchEvent(Unknown Source)

              at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)

              at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)

              at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)

              at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)

              at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)

              at java.awt.Component.dispatchEventImpl(Unknown Source)

              at java.awt.Container.dispatchEventImpl(Unknown Source)

              at java.awt.Window.dispatchEventImpl(Unknown Source)

              at java.awt.Component.dispatchEvent(Unknown Source)

              at java.awt.EventQueue.dispatchEvent(Unknown Source)

              at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

              at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

              at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

              at java.awt.Dialog$1.run(Unknown Source)

              at java.awt.event.InvocationEvent.dispatch(Unknown Source)

              at java.awt.EventQueue.dispatchEvent(Unknown Source)

              at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

              at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

              at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

              at java.awt.EventDispatchThread.run(Unknown Source)

      Caused by: javax.naming.NamingException: Failed to connect to any server. Servers tried: [remote://localhost:4447]

              at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:200)

              at org.jboss.naming.remote.client.HaRemoteNamingStore.namingStore(HaRemoteNamingStore.java:131)

              at org.jboss.naming.remote.client.HaRemoteNamingStore.namingOperation(HaRemoteNamingStore.java:112)

              at org.jboss.naming.remote.client.HaRemoteNamingStore.lookup(HaRemoteNamingStore.java:223)

              at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:79)

              at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:83)

              at javax.naming.InitialContext.lookup(Unknown Source)

       

       

      I have gone through the documents also and I have implemented in the same way. The links are

       

      https://docs.jboss.org/author/display/AS71/Remote+EJB+invocations+via+JNDI+-+EJB+client+API+or+remote-naming+project

       

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

       

      Am I still missing anything? Please share your points...

      Thanks,

      Ravi