You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/11/03 14:28:19 UTC

[Bug 61719] New: http2(h2) AsyncContext setReadListener NullPointerException

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

            Bug ID: 61719
           Summary: http2(h2) AsyncContext setReadListener
                    NullPointerException
           Product: Tomcat 9
           Version: 9.0.1
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Connectors
          Assignee: dev@tomcat.apache.org
          Reporter: 94544458@qq.com
  Target Milestone: -----

With http2 enabled(h2 with https), after AsyncContext started,

ServletInputStream sis = request.getInputStream();
  sis.setReadListener(this);  //this line throw exception


java.lang.NullPointerException
        at
org.apache.coyote.http2.Stream$StreamInputBuffer.registerReadInterest(Stream.java:920)
        at
org.apache.coyote.http2.StreamProcessor.registerReadInterest(StreamProcessor.java:176)
        at
org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:453)
        at org.apache.coyote.Request.action(Request.java:430)
        at
org.apache.catalina.connector.InputBuffer.isReady(InputBuffer.java:287)
        at
org.apache.catalina.connector.InputBuffer.setReadListener(InputBuffer.java:243)
        at
org.apache.catalina.connector.CoyoteInputStream.setReadListener(CoyoteInputStream.java:207)


If the post data as query string, then no problem.
but if the post data as http request body, then I got the above exception.

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


[Bug 61719] http2(h2) AsyncContext setReadListener NullPointerException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61719

--- Comment #4 from Jack <94...@qq.com> ---
9.0.1 is still in beta, where can I download the 9.0.2 in alpha or something?

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


[Bug 61719] http2(h2) AsyncContext setReadListener NullPointerException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61719

Remy Maucherat <re...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Remy Maucherat <re...@apache.org> ---
Fixed in 9.0.2. I don't know if there's a root cause that needs to be fixed.

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


[Bug 61719] http2(h2) AsyncContext setReadListener NullPointerException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61719

--- Comment #3 from Jack <94...@qq.com> ---
By the way, If I remove

        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />

from the https connector then I will not got this NullPointerException.

Good to know, you people have already fixed it. Great.

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


[Bug 61719] http2(h2) AsyncContext setReadListener NullPointerException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61719

--- Comment #1 from Jack <94...@qq.com> ---
By the way,  the code is in a AsyncContextHandler

ServletInputStream sis = request.getInputStream();
  sis.setReadListener(this);  //this line throw exception, this is the
ACHandler

any way, this will never be null, it has nothing to do with this. And it is
easy to see in Stream.java.

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


[Bug 61719] http2(h2) AsyncContext setReadListener NullPointerException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61719

--- Comment #5 from Remy Maucherat <re...@apache.org> ---
The fix will be included in 9.0.2 and 8.5.24.

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