Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1036

resteasy-netty4: NullPointerException when connection keep alive is false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.7.Final
    • 3.0.6.Final
    • jaxrs
    • None

      When running the following under resteasy-netty4 without keep-alive (The "Connection: close" header is present in the HTTP Request), a null pointer exception is thrown:

      Example.java
      @GET
      @Path("/async")
      public void getAsync(@Suspended final AsyncResponse response) {
          Response httpResponse = Response.ok().type(MediaType.TEXT_HTML).build();
          response.resume(httpResponse);
      }
      

      Exception stackTrace:

      StackTrace
      Mar 25, 2014 10:42:56 AM io.netty.channel.DefaultChannelHandlerContext invokeExceptionCaught
      WARNING: An exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
      java.lang.NullPointerException
      	at org.jboss.resteasy.plugins.server.netty.RequestHandler.channelRead0(RequestHandler.java:83)
      	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103)
      	at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:340)
      	at io.netty.channel.DefaultChannelHandlerContext.access$700(DefaultChannelHandlerContext.java:29)
      	at io.netty.channel.DefaultChannelHandlerContext$8.run(DefaultChannelHandlerContext.java:331)
      	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
      	at java.lang.Thread.run(Thread.java:744)
      

            patriot1burke@gmail.com Bill Burke (Inactive)
            patdunne Patrick Dunne (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: