6 Replies Latest reply on Jul 11, 2002 7:41 AM by Tim Dudgeon

    JNDI timeout problem from client

    Tim Dudgeon Newbie

      I'm new to jBoss, so please bear with me!

      Having succesfully deployed an EJB, it's now time to test it from a simple client. However I'm getting problems with doing jndi lookups, as I don't seem able to get a JNDI connection. The appropriate bit of code is as follows

      Properties env = new Properties();
      env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      env.put("java.naming.factory.url", "127.0.0.1:1099");

      // Get a naming context
      InitialContext jndiContext = new InitialContext(env);

      // Get a reference to the Bean
      Object ref = jndiContext.lookup("families/Family");

      ...


      The error I get is

      javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]

      I can telnet to port 1099 from a terminal window and get garbage back that suggests rmi stuff is in operation on that port.

      I've got jboss-j2ee.jar and jnp-client.jar on my classpath.
      Using jBoss3.0 and JDK1.4

      Any solutions would be welcome!

      Thanks

      Tim