Given this stack trace snippet
I tried to answer the following questions:
Caused by: java.net.SocketException:
Software caused connection abort:
socket write error
- What code is throwing this exception? (JVM?/Tomcat?/My code?)
- What causes this exception to be thrown?
Sun's JVM source doesn't contain this exact message, but I think the text Software caused connection abort: socket write error
is from the native implementation of
private native void socketWrite0(FileDescriptor fd, byte b, int off,
int len) throws IOException;
My guess is that it is caused when the client has terminated the connection, before getting the full response (e.g. sent a request, but before getting the full response, it got closed / terminated / offline)
- Are the above assumptions correct (#1 and #2)?
- Can this be diffrentiated from the situation: "could not write to the client, due to a network error on the server side"? or would that render the same error message?
- And most important: Is there an official document (e.g from Sun) stating the above?
I need to have a proof that this stack trace is the socket client's "fault", and there is nothing that the server could have done to avoid it. (except catching the exception, or using a non Sun JVM SocketOutputStream, though both don't really avoid the fact the client has terminated)