0 Replies Latest reply on Jan 6, 2016 6:27 AM by Ian MacIntyre

    Wildfly 10 CR5 - null pointer exceptions

    Ian MacIntyre Newbie

      Hi there,

       

      I am currently in the process of migrating our application from JBoss 7.2 to Wildfly 10 (CR5).

       

      I am seeing a lot of null pointer exceptions in the log around the writing of responses

      11:11:12,787 ERROR [stderr] (default task-27) java.lang.NullPointerException

      11:11:12,787 ERROR [stderr] (default task-27)   at io.undertow.server.protocol.http.HttpResponseConduit.write(HttpResponseConduit.java:605)

      11:11:12,787 ERROR [stderr] (default task-27)   at io.undertow.conduits.ChunkedStreamSinkConduit.flush(ChunkedStreamSinkConduit.java:267)

      11:11:12,788 ERROR [stderr] (default task-27)   at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162)

      11:11:12,788 ERROR [stderr] (default task-27)   at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:119)

      11:11:12,789 ERROR [stderr] (default task-27)   at io.undertow.server.HttpServerExchange.closeAndFlushResponse(HttpServerExchange.java:1652)

      11:11:12,789 ERROR [stderr] (default task-27)   at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1630)

      11:11:12,790 ERROR [stderr] (default task-27)   at io.undertow.server.Connectors.executeRootHandler(Connectors.java:226)

      11:11:12,790 ERROR [stderr] (default task-27)   at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)

       

      They seem to occur when the browser cancels a request when the server is still processing it.  If I look in Chrome development tools (network) every time I see the exception in the log it corresponds to a browser cancelled request.

       

      The stack traces I am seeing seem to correspond to an Undertow bug (601) - https://issues.jboss.org/browse/UNDERTOW-601 which is marked as resolved.

       

      Will this make it into Wildfly 10 Final ?

       

      I have also discovered the stacktrace disappears when I add gzip compression to the connection as follows

       

      <host alias="localhost" name="default-host">

        <filter-ref name="gzipFilter" predicate="exists['%{o,Content-Type}'] and regex[pattern='(?:application/javascript|text/css|text/html|text/xml|application/json)(;.*)?', value=%{o,Content-Type}, full-match=true]"/>

        <filter-ref name="Vary-header"/>

      </host>

      ...

      <filters>

        <response-header header-name="Server" header-value="WildFly/10" name="server-header"/>

        <response-header header-name="X-Powered-By" header-value="Undertow/1" name="x-powered-by-header"/>

        <gzip name="gzipFilter"/>

        <response-header header-name="Vary" header-value="Accept-Encoding" name="Vary-header"/>

      </filters>

       

      Ian