0 Replies Latest reply on Sep 17, 2014 3:00 PM by cpandey05

    Undertow throwing exception "java.lang.RuntimeException: java.io.IOException: UT000029: Channel was closed mid chunk, if you have attempted to write chunked data you cannot shutdown the channel until after it has all been written"

    cpandey05

      I have an application which uses Spring Websocket. It works perfect on Tomcat/WAS -recently we tried to port it on Wildfly. When sockjs tries to create connection and send frame on it (for using XHR streaming), undertow server discards the connection :

       

      2014-09-15 15:43:14,921 ERROR [io.undertow.request] (default task-25) Blocking request failed HttpServerExchange{ POST /acs/sockjs/cobrowse/agent/812/387wn4wh/xhr_streaming}: java.lang.RuntimeException: java.io.IOException: UT000029: Channel was closed mid chunk, if you have attempted to write chunked data you cannot shutdown the channel until after it has all been written.

          at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:527)

          at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:287)

          at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)

          at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)

          at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)

          at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177)

          at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]

          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]

      Caused by: java.io.IOException: UT000029: Channel was closed mid chunk, if you have attempted to write chunked data you cannot shutdown the channel until after it has all been written.

       

      I have enabled asyn support for spring dispatcher servlet. Any pointers? I am using wildfly-8.1.0.Final