Hi

In our production environment we (sometimes but still often enough) have the problem, that we get an NPE deep within the Response object.

This occurs under 8.5.13 and 8.5.16.

The stacktrace (from 8.5.13) is as follows:

org.apache.catalina.connector.Response.generateCookieString(Response.java:999)
org.apache.catalina.connector.Response.addCookie(Response.java:947)
org.apache.catalina.connector.ResponseFacade.addCookie(ResponseFacade.java:386)
javax.servlet.http.HttpServletResponseWrapper.addCookie(HttpServletResponseWrapper.java:58)
javax.servlet.http.HttpServletResponseWrapper.addCookie(HttpServletResponseWrapper.java:58)
javax.servlet.http.HttpServletResponseWrapper.addCookie(HttpServletResponseWrapper.java:58)

The code leading to it is:

Cookie c = new Cookie(cookieName, "");
c.setMaxAge(0);
cookie.setPath(contextPath);
response.addCookie(cookie);

We use the LegacyCookieProcessor via tomcat's context.xml:

<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" 
/>

It appears that the context object is null in those cases (which I can confirm using the debugger), but I have no clue as of why this could be happening? Especially since it doesn't happen every time.

Any clues or hints? What could I do to debug this problem?

BTW this doesn't happen on Tomcat 7.0.77

Thanks

Matt

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to