0 Replies Latest reply on Jul 30, 2002 6:30 PM by Patrick Haggood

    JNDI lookup timing out JBoss3/Tomcat 4

    Patrick Haggood Newbie

      Running code from JSP wrapped in WAR and deployed to {tomcat}/webapps. The code runs fine from testclass at commandline, barfs in webapp with following:

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

      jnp-client.jar is in WEB-INF/lib btw

      The JSP:

      Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      env.put(Context.PROVIDER_URL, "localhost:1099");
      Context jndiContext = new InitialContext(env);
      Object ref = jndiContext.lookup("AcademyPersonService");
      AcademyPersonServiceHome servicehome = (AcademyPersonServiceHome)
      PortableRemoteObject.narrow(ref, AcademyPersonServiceHome.class);
      AcademyPersonService service = servicehome.create();
      String xmlOutput = service.GetHelloMessage();