You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by F Amer <fa...@gmail.com> on 2020/02/20 19:15:11 UTC

IllegalStateException when updating Spring Boot to 2.1.7

I have a Spring Boot application, which is running fine and has with
the following setup

Spring Webflux + Tomcat 9

I have a Spring Boot application, which is running fine and has with
the following setup

- Spring Webflux + Tomcat
- Spring Actuator as dependency.
- Spring Boot 2.1.2
- Java 1.8.0_212
- Gradle 5.1 to build

However when I update to Spring Boot 2.1.7 & Spring 5.1.9 the
application fails to start.
This is the error in the logs

java.lang.IllegalStateException: Calling [asyncOperation()] is not
valid for a request with Async state [COMPLETING]


This is the stack trace

org.apache.coyote.AsyncStateMachine.asyncOperation(AsyncStateMachine.java:269)
org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:203)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:748)


What could be the issue here ?

However when I update to Spring Boot 2.1.7 & Spring 5.1.9 the
application fails to start.
This is the error in the logs
*java.lang.IllegalStateException: Calling [asyncOperation()] is not
valid for a request with Async state [COMPLETING]
*

This is the stack trace
*org.apache.coyote.AsyncStateMachine.asyncOperation(AsyncStateMachine.java:269)
org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:203)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:748)*


What could be the issue here ?

Re: IllegalStateException when updating Spring Boot to 2.1.7

Posted by Mark Thomas <ma...@apache.org>.
On 20/02/2020 19:15, F Amer wrote:
> I have a Spring Boot application, which is running fine and has with
> the following setup
> 
> - Spring Webflux + Tomcat
> - Spring Actuator as dependency.
> - Spring Boot 2.1.2
> - Java 1.8.0_212
> - Gradle 5.1 to build
> 
> However when I update to Spring Boot 2.1.7 & Spring 5.1.9 the
> application fails to start.
> This is the error in the logs
> 
> java.lang.IllegalStateException: Calling [asyncOperation()] is not
> valid for a request with Async state [COMPLETING]
> 
> 
> This is the stack trace
> 
> org.apache.coyote.AsyncStateMachine.asyncOperation(AsyncStateMachine.java:269)
> org.apache.coyote.AbstractProcessor.dispatch(AbstractProcessor.java:203)
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> java.lang.Thread.run(Thread.java:748)
> 
> 
> What could be the issue here ?

Looks like an application bug that has been exposed by improved state
checking in Tomcat.

If you provide the simplest possible test case that reproduces this
issue we can take a look.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org