8 Replies Latest reply on Jul 29, 2004 7:35 PM by cgardn2004

    NoRouteToHostException during JNDI lookup

    garam_jilebi

       

      "garam_jilebi" wrote:
      Hi,

      I am having a problem with my jndi lookup code.
      Here is the ejb client code:

      InitialContext context = new InitialContext(props);
      Object ref = context.lookup("EJB_JNDIName"); //--->mark

      the props is a Properties object with the following properties:

      "java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"
      "java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"
      "java.naming.provider.url", "jnp://localhost:1099"

      when running the client i am getting a NoRouteToHostException.
      While inspecting the stack trace i find that the stack contains the class/method:

      DatagramSocket.send(DatagramPacket)

      Does jBoss client use UDP to do jndi lookup?
      I tried checking the status of various socket listeners using "netstat -na"
      I find that there is a TCP listener for port 1099. There is no UDP listener for port 1099.

      I am adding all the jars in the JBoss/client folder to my client classpath along with j2ee.jar for j2sdkee.

      This is my environment:
      OS: Win 2000 Pro
      JDK: 1.4.0
      JBOss: 3.0.0
      J2EE: 1.3.1

      Where am I going wrong?

      Can anyone tell me where am I going wrong?

      Thanks in advance.