laredotornado wrote:
Hi,

I'm using Tomcat 6.0.26 with Java 1.6.  I'm getting a strange
NullPointerException from a Tomcat class.  My code is …

                if (request != null && 
request.getParameter(FORM_SUBMIT_SITE_NAME +
"FormSubmit") != null) {

and the stack trace is below.  I have verified I'm not passing a null to
"request.getParameter."  Another thread I found suggests this is an encoding
issue, but all the characters I'm using are UTF-8.  Any ideas how to
troubleshoot this further?
Thanks, - Dave


java.lang.NullPointerException
        at
org.apache.catalina.connector.Request.parseParameters(Request.java:2426)
        at
...

According to the above, it seems that the exception occurs at the moment when Tomcat parses the request parameters, which can be either in the URL query-string part of the request (if it is a GET), or in the request body (if it is a POST).

Most people on this list are old and cranky, and just don't believe things like "all the characters I'm using are UTF-8". We want proof.

So, 3 suggestions :

1) post here the full content of the <form> which makes the request (in the browser, use "save page as.."), and also the <Connector> tag from the server.xml file.
(Remove any comments, private stuff etc..)
This way, someone here may be able to spot a problem.

2) in the browser which you are using to make the request, install a plugin such as HttpFox (for Firefox) or Fiddler2 (for IE), activate it, make the request to the server, then use the plugin window to see *exactly* what the browser is sending to the server
(request URL, headers, and body if applicable).
This may already show you where the problem happens, but if not, then post here what you see in the plugin.

3) since the tomcat version you are using (6.0.26) is not the latest one (6.0.29), you may want to either upgrade and test again, or check the list of changes, in case there was a bug which was corrected between 6.0.26 and 6.0.29. It is unlikely that something as basic would have still been a bug in the 26th revision, but you will anyway not lose anything by upgrading to the latest version.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to