java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Re: [VOTE] Release Apache Tomcat 9.0.0.M3
    via by Rainer Jung,
  • Re: [VOTE] Release Apache Tomcat 9.0.0.M3
    via by Rainer Jung,
  • GitHub comment 75#200420806
    via GitHub by poutsma
    ,
  • GitHub comment 75#214657228
    via GitHub by poutsma
    ,
  • I'm using Spring 3.2.3 and Tomcat 7.0.41 with the NIO backend. I'm (still) experiencing problems with timeout handling of DeferredResult. (See SPR-10485 for an earlier bug.) Consider the following code: {code} @Controller public class TestController { @RequestMapping(value="/test") @ResponseBody public DeferredResult<String> test() { return new DeferredResult<String>(50L, "timeout\n"); } } {code} Now, create 100 threads which send this request in a loop: (The "parallel" command here is GNU parallel.) {code} yes 'curl --silent http://localhost:8080/test' | parallel -j100 {code} Some of these requests will fail and Tomcat will log the this exception: {code} jul 01, 2013 11:42:38 AM org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process SEVERE: Error reading request, ignored java.lang.IllegalStateException: Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] at org.apache.coyote.AsyncStateMachine.asyncPostProcess(AsyncStateMachine.java:204) at org.apache.coyote.AbstractProcessor.asyncPostProcess(AbstractProcessor.java:116) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:593) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) {code}
    via by Peter De Wachter,
  • I'm using Spring 3.2.3 and Tomcat 7.0.41 with the NIO backend. I'm (still) experiencing problems with timeout handling of DeferredResult. (See SPR-10485 for an earlier bug.) Consider the following code: {code} @Controller public class TestController { @RequestMapping(value="/test") @ResponseBody public DeferredResult<String> test() { return new DeferredResult<String>(50L, "timeout\n"); } } {code} Now, create 100 threads which send this request in a loop: (The "parallel" command here is GNU parallel.) {code} yes 'curl --silent http://localhost:8080/test' | parallel -j100 {code} Some of these requests will fail and Tomcat will log the this exception: {code} jul 01, 2013 11:42:38 AM org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process SEVERE: Error reading request, ignored java.lang.IllegalStateException: Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] at org.apache.coyote.AsyncStateMachine.asyncPostProcess(AsyncStateMachine.java:204) at org.apache.coyote.AbstractProcessor.asyncPostProcess(AbstractProcessor.java:116) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:593) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) {code}
    via by Peter De Wachter,
  • "async-supported" problem with Tomcat 7.0.29
    via by Satyen Hingorani,
    • java.lang.IllegalStateException: More than the maximum allowed number of headers ([100]) were detected. at org.apache.tomcat.util.http.MimeHeaders.createHeader(MimeHeaders.java:260) at org.apache.tomcat.util.http.MimeHeaders.addValue(MimeHeaders.java:305) at org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:802) at org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:579) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:978) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:760) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1524) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

    Users with the same issue

    Unknown visitor1 times, last one,