cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alec Bickerton <alec.bicker...@minick.ch>
Subject RequestWrapper and the case of the Nullpointer
Date Thu, 03 Apr 2008 16:30:52 GMT
Hi,

I'm seeing a problem with cocoon requests. When our application attempts 
to read a parameter from the request a NullpointerException is thrown.

I can't be more specific because this ONLY occurs when tomcat is started 
without a debugger. If I attach the debugger, it seem that the 
RequestWrapper initialises correctly and the parameter is found.

This is in cocoon 2.1.9, has anyone seen this before? Any ideas how I 
can prevent it happening through a configuration value?

Thanks,
Alec

The offending method

public String getParameter(String name) {
         String value = this.parameters.getParameter(name);
         if (value == null && this.rawMode == false)
             return this.req.getParameter(name);
         else
             return value;
     }


And here's a stacktrace too.


java.lang.NullPointerException	at 
org.apache.catalina.connector.Request.parseParameters(Request.java:2426)	at 
org.apache.catalina.connector.Request.getParameter(Request.java:1040) 
at 
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355) 
at 
org.apache.cocoon.environment.http.HttpRequest.getParameter(HttpRequest.java:316) 
at 
org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123)
	at 
org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123)
	at 
org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123)
	at 
org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123)
	at 
org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123)
	at 
org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123)
	at 
org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123)
	at 
ch.minick.portal.cocoon.environment.HttpServletRequestAdapter.getParameter(HttpServletRequestAdapter.java:160)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message