3 Replies Latest reply on Sep 23, 2003 9:26 AM by Adrian Brock

    jndi lookup timed out from Jboss client to WebLogic server

    jaychiu Newbie

      I got a Jndi lookup timed out exception when I tried to look up a WebLogic service through a very simple Java program with jboss jar and jndi properties. Can anyone please help me find out what is wrong and what is the right provider url I should use?

      My code is like:
      Properties jndiProps = new Properties();

      InitialContext jndiContext = new InitialContext(jndiProps);
      System.out.println("got intial context");
      Object ref = jndiContext.lookup("Environment");

      The exception I got is :
      javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1034)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1103)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:470)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:463)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at EJBClient.main(EJBClient.java:110)

      I also tried to set jndi properties in JVM parameters, and used jnp://dev007:9193. But I always got the same exception on lookup call. The jboss I use is version 3.0.5.

      However I am able to use a similar java program with weblogic context factory and provider.url=t3://dev007:9193 to lookup and get the home interface object.

      Thanks a lot.