tomcat-users mailing list archives

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

Dave,

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	http://laughlin-qa.criticalmass.com:8100//meetings/rfp/save.jsp
> 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	laughlin-qa.criticalmass.com:8100
> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAky2BhwACgkQ9CaO5/Lv0PAF0QCfbg410jchJ1x9iq1P62vbSpvD
pdkAnA85T1th2GHWGEBaD9gXYQryzOp0
=6D5N
-----END PGP SIGNATURE-----

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


Mime
View raw message