0 Replies Latest reply on May 26, 2010 3:56 PM by yashendra chandrakar

    Jboss 5, JNDI lookup failing with IPv6

    yashendra chandrakar Newbie


      I am using Jboss 5.0.1

      JNDI lookup is failing for me if I use IPv6, though it works fine for same set of servers for IPv4.


      I have this code to handle IPv4 and IPv6 URLs

      if (host instanceof Inet6Address) {
            env.setProperty(Context.PROVIDER_URL, "jnp://[" + host.getHostAddress() +  "]:1099/");
      } else {
           env.setProperty(Context.PROVIDER_URL,  "jnp://" + host.getHostAddress() + ":1099/");

      This is the error I am getting

      javax.naming.CommunicationException: Could not obtain connection to any of these urls: [2001:db8:aaaa:0:214:4fff:fe9f:4
      700]:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is ja
      va.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to con
      nect to server [2001:db8:aaaa:0:214:4fff:fe9f:4700]:1099:1099 [Root exception is javax.naming.ServiceUnavailableExcepti
      on: Failed to connect to server [2001:db8:aaaa:0:214:4fff:fe9f:4700]:1099:1099 [Root exception is java.net.UnknownHostE
      xception: [2001:db8:aaaa:0:214:4fff:fe9f:4700]:1099]]]
              at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
              at javax.naming.InitialContext.lookup(InitialContext.java:392)


      Doese this open ticket indicate that IPv6 is not supported in Jboss 5.0.1?




      I can also see this closed ticket


      but again this ticket has following comment in it

      Could not we add support for standard URL notation containing IPV6  address? E.g.:


      Some test cases in the testsuite rely on HOST:PORT notation. Thanks.


      I wonder if I need to user URL


      in place of