Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

SocketTimeoutException: Read timed out

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have successfully deployed the bean on JBoss Server and prepared a client application but it throws Exception When it comes at ic.lookup() Statement
The Error Reason as shown by toString() Function is
javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment;nested exception is:
My Question is Where to set Timeout
I have tried writing the following properties in jndi.properties file
then also the same error is raised
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming rg.jnp.interfaces
jnp.socket.factory=org.jnp.interfaces.TimedSocketFactory
jnp.timeout=0
jnp.socket.factory=0

Thanks in advance
 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using JBoss and in my test classes I initialize the Context like this:
java.util.Hashtable JNDIParm = new java.util.Hashtable();
JNDIParm.put(Context.PROVIDER_URL, "localhost");
JNDIParm.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
return new InitialContext(JNDIParm);
Also, if you want to make any Remote interface available you have to add it here also...
 
Chirag Jakharia
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks But I tried that by writing the following code
But it did not helped me the same thing then also
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic