https://bz.apache.org/bugzilla/show_bug.cgi?id=61524

            Bug ID: 61524
           Summary: NullPointerException in Http11OutputBuffer
           Product: Tomcat 8
           Version: 8.5.20
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: boris_pet...@live.com
  Target Milestone: ----

Hello, this has been happening on ALL 8.5.* versions (I've been upgrading to
the newest version for a while now) and possible for a long time before that.
Jersey's version is 2.25.1, Tomcat is 8.5.20. This is the stacktrace:

java.lang.NullPointerException: null
        at
org.apache.coyote.http11.Http11OutputBuffer.commit(Http11OutputBuffer.java:368)
        at
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1304)
        at
org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:258)
        at org.apache.coyote.Response.action(Response.java:175)
        at org.apache.coyote.Response.sendHeaders(Response.java:357)
        at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:303)
        at
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:284)
        at
org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:118)
        at
org.glassfish.jersey.servlet.internal.ResponseWriter$NonCloseableOutputStreamWrapper.flush(ResponseWriter.java:330)
        at
org.glassfish.jersey.message.internal.CommittingOutputStream.flush(CommittingOutputStream.java:292)
        at
org.glassfish.jersey.message.internal.OutboundMessageContext.close(OutboundMessageContext.java:876)
        at
org.glassfish.jersey.server.ContainerResponse.close(ContainerResponse.java:412)
        at
org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:784)
        at
org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)
        at
org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
        at
org.glassfish.jersey.server.ServerRuntime$AsyncResponder$3.run(ServerRuntime.java:934)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
        at
org.glassfish.jersey.server.ServerRuntime$AsyncResponder.resume(ServerRuntime.java:966)
        at
org.glassfish.jersey.server.ServerRuntime$AsyncResponder.resume(ServerRuntime.java:922)
        at com.company.rest.Contents.lambda$getContent$3(Contents.java:146)
        ...

What we're doing in "Contents.java:146" is something like:

        EntityTag entityTag = getEntityTag(content);
        ResponseBuilder responseBuilder =
request.evaluatePreconditions(entityTag);
        if (responseBuilder == null) {
                // cached resource did change -> serve updated content
                responseBuilder = createResponseBuilder(range,
content).tag(entityTag);
        }
        asyncResponse.resume(responseBuilder.build());

This "content" thing is practically an InputStream - i.e. with this request a
blob is returned. The funny thing is that this happens ALWAYS when returning
"tiff" images. Not sure if this matters of course or if the problem isn't
actually in something from our side. But anyways, this should not blow up with
a NPE. :)

Please tell me if you need any more information.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to