-
Bug
-
Resolution: Done
-
Major
-
1.1.0.Final
-
Linux, JRE 7
After I upgraded Wildfly 8.1.0 to 8.2.0 I began to notice thousands of NullPointerExceptions:
ERROR [io.undertow.request] (default task-54) Undertow request failed HttpServerExchange{ POST /myapp/logout}: java.lang.NullPointerException
at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:171)
at io.undertow.servlet.spec.ServletInputStreamImpl.close(ServletInputStreamImpl.java:245)
at io.undertow.servlet.spec.HttpServletRequestImpl.closeAndDrainRequest(HttpServletRequestImpl.java:602)
at io.undertow.servlet.core.ServletBlockingHttpExchange.close(ServletBlockingHttpExchange.java:87)
at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1444)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:213)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_72]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_72]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_72]
I could trace to problem to POST methods that had no parameters (except @HttpHeaders) in the methods' signature. So, the problem does not occur anymore if I change the method signature from:
@POST
@Path( "/logout" )
@Consumes( MediaType.APPLICATION_JSON )
@Produces( MediaType.APPLICATION_JSON )
public Response logout( @Context HttpHeaders hh ) {
...
}
to
@POST
@Path( "/logout" )
@Consumes( MediaType.APPLICATION_JSON )
@Produces( MediaType.APPLICATION_JSON )
public Response logout(String ignore, @Context HttpHeaders hh ) {
...
}