Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1034

IllegalStateException: UT000002: The response has already been started

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0.Beta1, 1.4.13.Final
    • 1.4.11.Final
    • Core
    • None

      Hi,

      I have an application that starts to send the response. Before the response is finished the client disconnects. At that point I receive the exception below:

      java.lang.IllegalStateException: UT000002: The response has already been started
      	at io.undertow.server.HttpServerExchange.setStatusCode(HttpServerExchange.java:1374) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.spec.AsyncContextImpl.handleError(AsyncContextImpl.java:405) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:306) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:209) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.spec.AsyncContextImpl$2$1.handleRequest(AsyncContextImpl.java:189) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:211) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.spec.AsyncContextImpl$2.run(AsyncContextImpl.java:186) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.spec.AsyncContextImpl$6.run(AsyncContextImpl.java:456) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at io.undertow.servlet.spec.AsyncContextImpl$TaskDispatchRunnable.run(AsyncContextImpl.java:567) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_121]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
      

      This exception hides the original exception which in this case is

      java.io.IOException: Broken pipe
      

      Is that ISE expected? Can you preserve the original exception and show it?

      Thanks,
      Violeta Georgieva

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              violetagg_jira V G (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: