logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Kjome" <h...@visi.com>
Subject Re: Exception
Date Mon, 16 Jul 2007 19:03:06 GMT
I recall that certain versions of Tomcat 5.5, I think somehwere in the 5.5.15 
to 5.5.17 series (don't quote me on that) had some serious classloader issues 
which were corrected in later releases.  Search the release notes and upgrade 
you Tomcat version.

Jake


On Mon, 16 Jul 2007 11:35:40 -0500
  Curt Arnold <carnold@apache.org> wrote:
> 
> On Jul 14, 2007, at 4:00 PM, Kenton wrote:
> 
>>
>> I'm getting this exception in my Struts application. It looks like  
>> a log4j
>> exception (or is it a Tomcat/catalina exception?). Any ideas on how  
>> I can
>> get this resolved?
>>
>> java.lang.NullPointerException
>>         at java.lang.String.startsWith(String.java:1422)
>>         at java.lang.String.startsWith(String.java:1451)
>>         at
>> org.apache.naming.resources.FileDirContext.file(FileDirContext.java: 
>> 916)
>>         at
>>
> ...
>> org.apache.catalina.loader.WebappClassLoader.getResource 
>> (WebappClassLoader.java:1181)
>>         at org.apache.log4j.helpers.Loader.getResource(Loader.java: 
>> 109)
>>         at org.apache.log4j.LogManager.<clinit>(LogManager.java:105)
>>         at org.apache.log4j.Logger.getLogger(Logger.java:104)
>>         at
>>
> 
> The exception occurs when log4j is trying to find either  "log4j.properties" 
>or "log4j.xml" to perform default initialization  (can't be sure which one 
>since your line numbers don't align with the  current source).  The resource 
>names are stored in static final  members.  There are two possibilities that 
>I see:
> 
> a) either Tomcat's app reloading mechanism result in the static final 
> members being null and not the expected value.  The null passed down 
> through the Tomcat class loaders results in the NPE.
> 
> b) The expected value gets passed down to Tomcat and there is an 
> implementation bug in Tomcat's class loader.
> 
> Looks like something Tomcat specific and you would have better like 
> reposting on tomcat-user and specifying what version on Tomcat you  are 
>using and the conditions under which the exception is encountered.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

  

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


Mime
View raw message