https://issues.apache.org/bugzilla/show_bug.cgi?id=57481

            Bug ID: 57481
           Summary: IllegalStateException for nonblocking/numberwriter
                    example with BIO connector
           Product: Tomcat 8
           Version: 8.0.17
          Hardware: PC
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: knst.koli...@gmail.com

Steps to reproduce:
1. Configure Tomcat 8.0.17 to use BIO implementation of HTTP connector,
    <Connector port="8081" address="127.0.0.1"
               protocol="org.apache.coyote.http11.Http11Protocol"
               connectionTimeout="20000"
               redirectPort="8443" />

2. Start Tomcat

3. Access
http://localhost:8081/examples/servlets/nonblocking/numberwriter

4. Result:
The page is displayed successfully (as expected),
but at the same time an IllegalStateException is logged to the console and into
catalina.2015-01-22.log file (an unexpected):

[[[
22-Jan-2015 11:02:03.089 SEVERE [http-bio-127.0.0.1-8081-exec-10]
org.apache.catalina.connector.CoyoteAdapter.asyncDispatch Exception while
processing an asynchronous request
 java.lang.IllegalStateException: Calling [asyncComplete()] is not valid for a
request with Async state [DISPATCHED]
    at
org.apache.coyote.AsyncStateMachine.asyncComplete(AsyncStateMachine.java:270)
    at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:848)
    at org.apache.coyote.Request.action(Request.java:377)
    at
org.apache.catalina.core.AsyncContextImpl.complete(AsyncContextImpl.java:86)
    at
nonblocking.NumberWriter$NumberWriterListener.onError(NumberWriter.java:145)
    at
org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:304)
    at
org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1696)
    at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:650)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:147)
    at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:279)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
]]]

The NIO and APR connectors are working OK.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to