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 2015/01/20 19:15:00 UTC

[Bug 57470] New: Occaisionally NPE in org.apache.catalina.connector.Response.addSessionCookieInternal()

https://issues.apache.org/bugzilla/show_bug.cgi?id=57470

            Bug ID: 57470
           Summary: Occaisionally NPE in
                    org.apache.catalina.connector.Response.addSessionCooki
                    eInternal()
           Product: Tomcat 7
           Version: 7.0.55
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: mark@mrobinson.ca

Occaisionally I get an NPE in
org.apache.catalina.connector.Response.addSessionCookieInternal():1008

Code at fault

        MimeHeaders headers = coyoteResponse.getMimeHeaders();
        int n = headers.size();
        for (int i = 0; i < n; i++) {
1008:        if (headers.getName(i).toString().equals(headername)) {
                if (headers.getValue(i).toString().startsWith(startsWith)) {
                    headers.getValue(i).setString(sb.toString());
                    set = true;
                }
            }
        }

I could submit a patch that just aggressively checks for nulls but I'm not sure
that is the correct solution.  Some possible causes could be:

1. The value of headers.size() is changing.  Which is bad since it would
indicate some threading problems.

2. MessageBytes is somehow producing a null.  It could be the type is unknown
or the given chunk type is occaisionally returning null contents.

-- 
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 57470] Occaisionally NPE in org.apache.catalina.connector.Response.addSessionCookieInternal()

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

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
Sound like most likely to be retaining a response object's reference somewhere
and using it incorrectly/improperly.

We need much more information if you really think there is a bug here.

-- 
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 57470] Occaisionally NPE in org.apache.catalina.connector.Response.addSessionCookieInternal()

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

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
All the indications are that this is an application bug. Please follow-up on
the users mailing list. You can always re-open this issue if a Tomcat bug is
found to be at the root of this.

-- 
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