You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/02/07 21:04:33 UTC

DO NOT REPLY [Bug 3815] - JspServlets produces NullPointerException

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3815>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3815

JspServlets produces NullPointerException

mock-apache@misfit.dhs.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From mock-apache@misfit.dhs.org  2003-02-07 20:04 -------
During some load testing I have done, I have observed a similar exception.
I'm not sure that this bug has anything to do with errors in user code,
otherwise we would see user code in the stack trace, no ?

More likely, this is related to bug 14077 "JSP class corruption when compiling
page on SMP server", as I have encountered this problem on an SMP system.

My environment included

   Tomcat 4.0.4 
   Sun E420R with 4 CPUs
   Solaris 2.8

After doing some investigation of JspServlet.java, there are some very
clear race conditions that can happen which cause all sorts of funky
exceptions including the NPE originally filed, when Tomcat is loaded down 
heavily with multiple requests. 

I have created a patch that has eliminated the problem entirely for me.

What it tries to do is prevent a single JSP from being loaded concurrently
from multiple threads. Besides fixing this immediate problem, It also
appears to alleviate the Jasper MT problems in bug 14077. 

I can now run Tomcat and heavily load it down with requests, touch all
the JSPs to force them to recompile, and no errors occur.

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