Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.net.SocketException: Software caused connection abort: recv failed

843834Aug 1 2003 — edited Jul 15 2008
I wrote a socket server and I'm running every connection in a thread. This loop is waiting for incoming Data:
public void run() {
	BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
	try {
		while (isPlugged) {
			incomingXML = in.readLine();
			if (incomingXML != null) {
				if (incomingXML.length() > 1) {  
					parseXML(incomingXML);
				}
			} else {
				break;
			}
		}
	} catch (IOException e) {
		logger.logError("Error",e);  // for Logfile
	} finally {
		unplug();  // abort connection
	}
}
Sometimes I get a java.net.SocketException: Software caused connection abort: recv failed.

Why do I get this exception? The strange thing is, that it appears just from time to time.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2008
Added on Aug 1 2003
20 comments
5,755 views