Greetings,
I've seen similar behavior under Tomcat. Here's what I've found:
This thread
http://www.mail-archive.com/[email protected]/msg05846.html
from January seemed to narrow the problem to DefaultCookieParser and
pointed the way to a solution. However, that solution isn't present in
CVS for either turbine-2 or fulcrum.
The specific problem cited is that DefaultCookieParser doesn't account
for the possibility that the request's getCookies method might return
null. This can happen if no cookies are sent with the request, such as
when the browser doesn't accept cookies or when there just aren't any
cookies. See
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html#getCookies()
I'm going to test this hypothesis by writing my own (patched) cookie
parser. I'll post my results when available, hopefully by the end of
the week.
Mike Scott wrote:
>We've been running an application based on Turbine 2.1 in production use
>under Tomcat 3.2 for over a year. We're now evaluating Resin 2.1.4 as a
>replacement for Tomcat (in search of better performance), and the changes in
>the setup seem fairly straightforward except that I'm getting an error
>thrown as follows:
>
>Horrible Exception: java.lang.NullPointerException
> at
>org.apache.turbine.util.parser.DefaultCookieParser.setRunData(DefaultCookieP
>arser.java:154)
> at
>org.apache.turbine.services.rundata.DefaultTurbineRunData.getCookies(Default
>TurbineRunData.java:518)
> at org.apache.turbine.Turbine.doGet(Turbine.java:279)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:9
>6)
> at com.caucho.server.http.Invocation.service(Invocation.java:312)
> at
>com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
> at
>com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
> at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
> at java.lang.Thread.run(Thread.java:484)
>
>Turbine seems to have some problem with setting the initial cookies. If I
>use a browser with cookies disabled, I get this error every time I try to
>load a Turbine page. If I have cookies enabled, I get it the first time, and
>if I refresh the page then loads normally, so I guess it's connected with
>the session management.
>
>
>
--
Edwin Gustafson
Cayman Chemical Company
--
734 971 3586 x 221
http://www.caymanchem.com/promo/ewg
42*13'44" N 83*43'25" W
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>