Bug 5988 - Jasper Null Pointer Exception Error
Summary: Jasper Null Pointer Exception Error
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 4.0.1 Final
Hardware: PC All
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-23 19:49 UTC by Pavel Brun
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Brun 2002-01-23 19:49:40 UTC
Quite a number of times, I receive a null pointer exception error when
trying to access components with the "request" and/or "pagecontext" objects 
within a JSP page. Could this be related to session issues? Could this be 
related to using the <jsp:usebean> attribute?

Here is the stack-trace dump on one of the pages:

java.lang.NullPointerException
	at org.apache.jasper.servlet.JasperLoader.loadClass
(JasperLoader.java:198)
	at org.apache.jasper.servlet.JasperLoader.loadClass
(JasperLoader.java:132)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
	at org.apache.jsp.display$jsp._jspService(display$jsp.java:101)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:202)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:382)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:201)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2344)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:164)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
	at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:462)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:163)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1011)
	at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1106)
	at java.lang.Thread.run(Thread.java:484)
Comment 1 Pavel Brun 2002-01-23 19:50:38 UTC
One additional thing...it goes away when I try to refresh the page.
Comment 2 Kin-Man Chung 2002-01-28 18:56:21 UTC
Please include a reproducible test case.  Thanks.
Comment 3 Remy Maucherat 2002-02-01 17:44:01 UTC
After a lot of investigation, it turns out the context class loader ended up
being set to null during the first run of the JSP page (unfortunately, I failed
to attach the test case), which then gives this very strange stack trace.