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: 10.0.1.6:8080 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 
10.0.1.6:8080 [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 10.0.1.6:8080 [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 
-Djava.net.preferIPv4Stack=true to my runtime arguments, and ran jboss with the 
following command: 
$ ./run.sh --host=10.0.1.6

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)
  |   {
  |     try
  |     {
  | 
  |       connectToJBoss();
  | 
  |       System.out.println(hwRemote.getHelloWorldString("TestThisString"));
  |       System.out.println(hwRemote.getHelloWorldString("TestAnotherString"));
  | 
  |     }
  |     catch (NamingException ex) 
  |     {
  |        ex.printStackTrace();
  |     }
  |   }
  |   
  |   private static void connectToJBoss() throws NamingException
  |   {
  |     try
  |     {
  |     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");
  |     ctx.addToEnvironment("java.naming.provider.url","10.0.1.6:8080");
  |     hwRemote = (HelloWorld) ctx.lookup(HelloWorld.class.getName());
  |     }
  |     catch (NamingException ex) {
  |       throw ex;
  |     }
  |   }
  | 


Thanks in advance for your replies!!!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3935182#3935182

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3935182


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to