logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40212] - NullPointerException in getLogger when called from ShutdownHook
Date Fri, 06 Jul 2007 09:39:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40212>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40212





------- Additional Comments From digulla@hepe.com  2007-07-06 02:39 -------
I have the same problem during redeploy. It sometimes happens during shutdown
and always when it is started again:

Caused by: java.lang.NullPointerException
	at org.apache.log4j.Category.isEnabledFor(Category.java:746)
	at org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogger.java:327)
	at net.sf.ehcache.store.MemoryStore.get(MemoryStore.java:137)
	at net.sf.ehcache.Cache.searchInMemoryStore(Cache.java:820)
	at net.sf.ehcache.Cache.get(Cache.java:655)
	at net.sf.ehcache.constructs.blocking.BlockingCache.get(BlockingCache.java:513)
	at
net.sf.ehcache.constructs.blocking.SelfPopulatingCache.get(SelfPopulatingCache.java:71)

My setup is this:

- commons-logging-api 1.1 in tomcat/bin
- commons-logging 1.1 in tomcat/common/lib
- log4j 1.2.14 in tomcat/common/lib
- ehcache 1.2.4 in tomcat/common/lib
- property files in tomcat/common/classes
- commons-logging 1.1 in WEB-INF/lib
- log4j 1.2.14 in WEB-INF/lib
- property files in WEB-INF/classes

I have *two* webapps deployed which use ehcache. My guess is that during
shutdown, the log4j which is used by tomcat itself is destroyed while the webapp
tries to get rid of its copy because there is a mixup in the classloader or a
pointer into log4j from ehcache (which probably uses the tomcat log4j) leaks
into the webapp.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message