tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <remy.mauche...@gmail.com>
Subject Re: Tomcat 5.5.4, Logging and the death of my friend localhost_log
Date Fri, 12 Nov 2004 10:07:27 GMT
On Fri, 12 Nov 2004 09:55:20 -0000, Allistair Crossley
<allistair.crossley@qas.com> wrote:
> Hi,
> 
> I have some new information on this for my case. I created a small JSP that had a scriplet
error and ran it. I am definately using 5.5.4 with Java 5.0. In this case, I got the error
stack trace in stdout. This used to come out in localhost_log. That's fine, at least I got
it.
> 
> However, there is an error produced by my application on startup that is *not* being
dumped anywhere, and I do not believe either that any amount of log4j/commons configuration
would get it because log4j/commons logging is only useful where the developer chooses to notify
the logging subsystem which is not runtime errors fromt the JRE.
> 
> This is part of the stack trace in 5.0.28's localhost_log
> 
> 2004-11-08 09:29:32 StandardContext[/iq]Exception sending context initialized event to
listener instance of class com.qas.newmedia.intranet.iq.IQContextListener
> java.lang.NullPointerException
>         at com.qas.newmedia.intranet.iq.logic.core.CoreLogic.getDepartmentsByCategory(CoreLogic.java:234)
>         at com.qas.newmedia.intranet.iq.IQContextListener.contextInitialized(IQContextListener.java:86)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3805)
>         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4321)
> 
> Therefore a NullPointerException is being thrown in 5.5.4 but not being reported anywhere
which is a little unhelpful for me :(
> 
> So I am back to my original question really ... how on earth would I get this NPE logged
by Tomcat 5.5.4.

This should go to the logger category for the Context, logged as ERROR
level, as it will be logged through the servlet context. Maybe there's
a problem somewhere, but I find it hard to believe. You can look at
the code in StandardContext.listenerStart, ApplicationContext.log and
in ContainerBase.getLogger: this looks very straightforward.
You can send me a test war if you think it doesn't work.

-- 
xxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxx

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


Mime
View raw message