tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: NullPointerException when Tomcat calls org.apache.catalina.connector.Request.parseParameters
Date Wed, 13 Oct 2010 19:18:52 GMT
Hash: SHA1


Resurrecting this thread from last week.

On 10/7/2010 2:53 PM, laredotornado wrote:
> You are correct.  This stack trace came from a server with 6.0.13 installed. 
> We also observed this in our environment with 6.0.24.

Can you give us the stack trace from 6.0.24?

The line of code for 6.0.13 is this:

2426   if (!getMethod().equalsIgnoreCase("POST"))
2427      return;

The only dereferencing that's going on is against the return from
getMethod, since 'this' can never be null. I don't understand why the
request method would be null.

Can you provide an access log which shows some basic information about
the request (particularly, the HTTP method being used at the time)?

I do know that older versions of Tomcat would allow just any HTTP method
(including nonsense ones like FOOBAR) to be invoked against a JSP. At
some point, it was changed so that a JSP could only respond to (IIRC)
GET and POST. For these old versions, it's possible that a null method
could hit a JSP and trigger this error.

> Right now, it is not
> an option to upgrade.

That's too bad. You should get the latest version (6.0.29) into testing
ASAP: 6.0.13 is over 3 years old and Tomcat has had significant security
improvements since then.

> Is there a work-around?

I would guess that you have a client that is sending a bad HTTP request,
honestly. Is this reproducible? Or are you just seeing errors in your
log files?

> Below is the connector info
> from our server.xml file and the request from the Net panel of Firebug.

The connector configuration shouldn't matter.

> Params:
> next	save
> Response Headers:
> Date	Thu, 07 Oct 2010 18:30:35 GMT
> Server	Apache/2.2.4 (Unix) mod_jk/1.2.25
> Location
> Vary	User-Agent,Accept-Encoding
> Content-Encoding	gzip
> Keep-Alive	timeout=10
> Connection	Keep-Alive
> Transfer-Encoding	chunked
> Content-Type	text/html;charset=UTF-8
> request headers:
> Request Headersview source
> Host
> User-Agent	Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;

Hmm... I would expect Firefox to be a decent client :)

I can't tell from this listing: what did the request line look like that
went to the server?

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message