[jboss-user] [JNDI/Naming/Network] - Tomcat client + JBOSS server

fausto_minotti do-not-reply at jboss.com
Thu Jul 19 13:32:46 EDT 2007

Regarding to JBossIDE-Tutorial.pdf I worked through this tutorial and I reached my first EJB

Now I?m trying to deploy the application as clent and server using Tomcat 5.5 and JBOSS 4.2.0GA ( on two different host placed in the same lan )
I have the same project on the JBOSS and the new one in Tomcat
In Tomcat I copied only the interfaces and servlet because I want to call the EJB method from Tomcat application container
I modified the code of ComputeServlet.java in this way

  | Hashtable env = new Hashtable();
  | env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingCotextFactory");
  | env.put(Context.PROVIDER_URL, "jnp://");
  | Context context = new InitialContext(env);
  | Object ref = context.lookup("ejb/Fibo");
  | home = (FiboHome) PortableRemoteObject.narrow(ref, FiboHome.class);

during the lookup method I reach the same error message

--------javax.naming.CommunicationException: Could not obtain connection to any of these urls: and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server [Root exception is java.net.ConnectException: Connection refused: connect]]]

it seams that the Tomcat client doesn?t reach the JBOSS server
I wonder if anyone could give me any suggestion
Many many thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065908#4065908

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065908

More information about the jboss-user mailing list