This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Please identify error  RSS feed

 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can anyone suggest when the following errors comes.
--------------------------------------------------------
1)
javax.naming.NamingException: Lookup error: java.net.SocketException:
Connection reset; nested exception is:
java.net.SocketException: Connection reset [Root exception is
java.net.SocketException: Connection reset]
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:153)

2)java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)

-------------------------------------------------------------------
Thanks and Regards
Nilesh Sah
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A socket connection requires cooperation on both ends. You get that exception when you try to read or write to a socket and the other end has closed the socket. Your code should provide for recovering from this condition.
Bill
 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William,
First of all thanks for your reply.Could you explain me more elaborately so that I could work on it.

Thanks again
Nilesh Sah
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you explain me more elaborately so that I could work on it

Without seeing your code, I can only generalize. The architecture of your program can NOT depend on the socket connection staying open forever. You must provide for graceful recovery when you get a SocketException. You must also provide for graceful exiting if attempts to reconnect fail repeatedly.

Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!