You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2020/02/03 15:30:55 UTC
[Bug 64111] New: Exception while processing an asynchronous request
NullPointerException at org.apache.catalina.core.AsyncContextImpl.timeout
https://bz.apache.org/bugzilla/show_bug.cgi?id=64111
Bug ID: 64111
Summary: Exception while processing an asynchronous request
NullPointerException at
org.apache.catalina.core.AsyncContextImpl.timeout
Product: Tomcat 9
Version: 9.0.30
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Connectors
Assignee: dev@tomcat.apache.org
Reporter: f.janssen@blueriq.com
Target Milestone: -----
Created attachment 36990
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36990&action=edit
Project used to reproduce the issue
I have a Spring Boot application that offers asynchronous endpoints with
project reactor. I deploy the application as a war file on Tomcat.
When I stop Tomcat while a client is connected to such a request, a
NullPointerException is printed upon shutdown:
03-Feb-2020 16:07:46.104 INFO [main] org.apache.coyote.AbstractProtocol.stop
Stopping ProtocolHandler ["http-nio-8080"]
03-Feb-2020 16:07:46.108 SEVERE [http-nio-8080-exec-5]
org.apache.catalina.connector.CoyoteAdapter.asyncDispatch Exception while
processing an asynchronous request
java.lang.NullPointerException
at
org.apache.catalina.core.AsyncContextImpl.timeout(AsyncContextImpl.java:146)
at
org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:153)
at
org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:237)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:59)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
I attached a very simple project to demonstrate the issue:
* Build the attached project with maven
* Deploy the war file on Tomcat (with Java 11 as JRE)
* Connect a browser to http://<host>:<port>/<contextPath>/push-messages
* Shut Tomcat down while the request is active
* Check the logs to see the Exception + stack trace
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 64111] Exception while processing an asynchronous request
NullPointerException at org.apache.catalina.core.AsyncContextImpl.timeout
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64111
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
Resolution|--- |WORKSFORME
Status|NEW |RESOLVED
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
The provided project does not produce the exception shown when the steps to
reproduce the issue are followed.
Looking at the application source code, I don't see anything registering any
form of handler for ServletContext shutdown. And with a debugger, I don't see
any calls at all to AsyncContextImpl.timeout().
I do see a log message indicating that the application has started, but failed
to stop, a thread.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org