1 Reply Latest reply on Apr 6, 2006 1:45 AM by Thomas Van Buskirk

    4.0.4.CR2 with Mac

    Thomas Van Buskirk Newbie

      Hi everyone,

      I am running Mac OS X 10.4.

      About a week ago, I had been receiving this error using JBoss AS 4.0.3SP1:

      javax.naming.CommunicationException: Could not obtain connection to any of these urls: and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to retrieve stub from server [Root exception is java.io.EOFException]]
       at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1399)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at HelloWorldJBossClient.connectToJBoss(HelloWorldJBossClient.java:134)
       at HelloWorldJBossClient.main(HelloWorldJBossClient.java:114)
      Caused by: javax.naming.CommunicationException: Failed to retrieve stub from server [Root exception is java.io.EOFException]
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
       at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1370)
       ... 5 more
      Caused by: java.io.EOFException
       at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2232)
       at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
       at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
       at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:235)
       ... 6 more

      But I finally fixed it after seeing some posts.

      To make it work, I disabled IPv6 at kernel level, added
      to my runtime arguments, and ran jboss with the following command:
      $ ./run.sh --host=

      Now, I'd like to upgrade to JBoss 4.0.4.CR2, but I receive the above error again. I made all of the same changes I made to get 4.0.3SP1 working, but still get the same error. I can still run perfectly with 4.0.3SP1, using the same code and the same system.

      Are there any changes I need to know about that occurred between 4.0.4.CR2 and 4.0.3SP1 that may be causing this?

      Here's my code:

      public static void main(String[] args)
       catch (NamingException ex)
       private static void connectToJBoss() throws NamingException
       InitialContext ctx = new InitialContext();
       ctx.addToEnvironment("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
       ctx.addToEnvironment("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
       hwRemote = (HelloWorld) ctx.lookup(HelloWorld.class.getName());
       catch (NamingException ex) {
       throw ex;

      Thanks in advance for your replies!!!