-
1. Re: Can't see JNDI on remote server
adrian.brock Nov 4, 2003 5:00 PM (in response to vovan_onjava)A NullPointerException does not give us much to
work with.
For 10,000 time post the full stack trace.
Have you checked /etc/hosts or FAQ forum
"Cannot connect to 127.0.0.1" or similar
Regards,
Adrian -
2. Re: Can't see JNDI on remote server
vovan_onjava Nov 9, 2003 12:42 PM (in response to vovan_onjava)> A NullPointerException does not give us much to
> work with.
>
> For 10,000 time post the full stack trace.
>
> Have you checked /etc/hosts or FAQ forum
> "Cannot connect to 127.0.0.1" or similar
>
> Regards,
> Adrian
The strange thing is that I can execute the program correctly on my localhost, but when it goes to remote host: viktor.ld.ttu.ee, then the problem arise. The jboss installation on viktor.ld.ttu.ee is absolutely the same as on my localhost, and the port 1099 seems to be open (I tried telnet). I just wonder what could be wrong with it.
The only exception I got is: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] -
3. Re: Can't see JNDI on remote server
jonlee Nov 9, 2003 5:57 PM (in response to vovan_onjava)Assuming you don't have any other network related errors, have you tried using the TimedSocketFactory to see if this has any impact? Add the following to your context properties before you do the lookup:
jndiProps.setProperty("jnp.socketFactory", "org.jnp.interfaces.TimedSocketFactory");
jndiProps.setProperty("jnp.timeout", "0");
jndiProps.setProperty("jnp.sotimeout", "0");
Context jndiContext = new InitialContext(jndiProps);
etc.
You can obviously add timeouts. I can't remember when we had this problem or what the exact conditions were but this did solve the issue for the particular environment.
Hope it helps.