tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nacho <na...@siapi.es>
Subject RE: Servlet config is null; log() fails
Date Wed, 05 Jul 2000 20:11:23 GMT
This gives me a stacktrace everytime i hit the page, but with a
interesting thing, it gives a different stack trace in each case, i'm
using Oracle's JDeveloper 3.1 ( which uses jdk 1.2.2_Jdeveloper ) and
jdk l.3.0 here are the "Root Cause" Section for jdk 1.3.0 sun in win2k
box

8<-------------------------------- jdk_1.3.0
Causa Raiz: 
java.lang.NullPointerException
	at
javax.servlet.GenericServlet.getServletName(GenericServlet.java:368)
	at javax.servlet.GenericServlet.log(GenericServlet.java:300)
	at
_0002ftest_0002ejsptest_jsp_0._jspService(_0002ftest_0002ejsptest_jsp_0.
java:56)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:124)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:177)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:296)
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:369)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:368)
	at org.apache.tomcat.core.Handler.service(Handler.java:261)
	at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:356)
	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:720)
	at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:666)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpConnectionHandler.java:194)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403
)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:48
4)
	at java.lang.Thread.run(Thread.java:484)
8<-------------------------------- jdk_1.3.0

> -----Mensaje original-----
> De: Alex Chaffee [mailto:guru@edamame.stinky.com]
> Enviado el: miƩrcoles 5 de julio de 2000 14:06
> Para: tomcat-dev@jakarta.apache.org
> Asunto: BUG: Servlet config is null; log() fails
> 
> 
> From a servlet or jsp, sometimes, I get a NullPointerException when
> attempting log("foo").  Tracking it down, the null pointer is the
> instance variable "config", which is set inside GenericServlet.init.
> I expect this means that sometimes the servlet engine forgets to call
> init() on a newly-created servlet.  
> 
> Compiling a log() into GenericServlet.init() confirms this, in that it
> always works, meaning that it's not the case that init() is being sent
> a null config object.
> 
> Haven't tracked it down further.  Easy to reproduce -- just make the
> following JSP:
> 
>  <% log("foo"); %>
> 
> Please someone try that tell me if that works for you.
> 
> 
> -- 
> Alex Chaffee                       mailto:alex@jguru.com
> jGuru - Java News and FAQs         http://www.jguru.com/alex/
> Creator of Gamelan                 http://www.gamelan.com/
> Founder of Purple Technology       http://www.purpletech.com/
> Curator of Stinky Art Collective   http://www.stinky.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 

Mime
View raw message