https://issues.apache.org/bugzilla/show_bug.cgi?id=51120
Summary: Nullpointer exception in CoyoteAdapter when the Client
disconnects the socket abruptly.
Product: Tomcat 7
Version: 7.0.12
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [email protected]
The tomcat container throws an expception to the log , when the client
disconnects the socket abruptly.
The exception is ,
SEVERE: An exception or error occurred in the container during the request
processing
java.lang.NullPointerException
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:426)
at
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:396)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:357)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1531)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Steps,
1. I have a desktop client written in python. It sends a HTTP request with
content length of 1000.
2. Server responds with BEGIN
3. The desktop makes use of NIO to hold the connection for updates .
4. When i close the python client before the timeout (declared in server) ,
this exception is thrown .
I have put forth a simple testing server code,
My server.xml
<Connector port="9000"
connectionTimeout="216000"
protocol="org.apache.coyote.http11.Http11NioProtocol"
redirectPort="8443" />
My testing server code ,
@Override
public void event(CometEvent ce) throws IOException, ServletException {
if (ce.getEventType() == CometEvent.EventType.BEGIN) {
} else if (ce.getEventType() == CometEvent.EventType.ERROR) {
ce.close();
} else if (ce.getEventType() == CometEvent.EventType.END) {
ce.close();
} else if (ce.getEventType() == CometEvent.EventType.READ) {
}
}
Other details
JDK Used : 1.6
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]