[slf4j-dev] [Bug 142] New: NPE when logging with SLF4JLocationAwareLog after Serialization
bugzilla-daemon at pixie.qos.ch
bugzilla-daemon at pixie.qos.ch
Wed Jul 29 00:06:20 CEST 2009
http://bugzilla.slf4j.org/show_bug.cgi?id=142
Summary: NPE when logging with SLF4JLocationAwareLog after
Serialization
Product: SLF4J
Version: 1.5.x
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: normal
Priority: P1
Component: Implementations
AssignedTo: dev at slf4j.org
ReportedBy: youngm at gmail.com
We're using jcl-over-slf4j. When we Serialize an instance of
SLF4JLocationAwareLog any subsequent calls to SLF4JLocationAwareLog throw a
NPE.
Would it be possible to improve the Serialization implementation of
SLF4JLocationAwareLog either retrieve the LocationAwareLogger on readResolve()
or simply check for a null logger instead of throwing an NPE?
The following is a stacktrace I get when using jcl-over-slf4j with Spring:
[7/28/09 0:14:32:226 MDT] 0000005a SystemErr R java.lang.NullPointerException
[7/28/09 0:14:32:226 MDT] 0000005a SystemErr R at
org.apache.commons.logging.impl.SLF4JLocationAwareLog.isDebugEnabled(SLF4JLocationAwareLog.java:59)
[7/28/09 0:14:32:226 MDT] 0000005a SystemErr R at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.buildLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:201)
[7/28/09 0:14:32:226 MDT] 0000005a SystemErr R at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.findLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:182)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeDestruction(InitDestroyAnnotationBeanPostProcessor.java:160)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:140)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
org.springframework.beans.factory.support.DisposableBeanAdapter.run(DisposableBeanAdapter.java:134)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
org.springframework.web.context.request.ServletRequestAttributes$DestructionCallbackBindingListener.valueUnbound(ServletRequestAttributes.java:269)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.webcontainer.httpsession.SessionData.processListeners(SessionData.java:924)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.webcontainer.httpsession.SessionData.checkSwappableListeners(SessionData.java:564)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.webcontainer.httpsession.DatabaseSessionData.checkSwappableListeners(DatabaseSessionData.java:331)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.webcontainer.httpsession.SessionData.sessionUnbound(SessionData.java:997)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.webcontainer.httpsession.SessionContext.notifySessionInvalidated(SessionContext.java:1100)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.webcontainer.httpsession.SessionData.invalidate(SessionData.java:621)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.webcontainer.httpsession.SessionData.internalInvalidate(SessionData.java:586)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.webcontainer.httpsession.DRSSessionData.internalInvalidate(DRSSessionData.java:252)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.webcontainer.httpsession.HttpSessDRSCacheMsgListener.response(HttpSessDRSCacheMsgListener.java:524)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.drs.stack.DRSClientCallback.processRcvMessage(DRSClientCallback.java:393)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.drs.stack.DRSStack.processRcvMessage(DRSStack.java:295)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.drs.DRSDomain.messageReceived(DRSDomain.java:536)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.drs.ha.DRSAgentClassEvents$1.run(DRSAgentClassEvents.java:714)
[7/28/09 0:14:32:227 MDT] 0000005a SystemErr R at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the slf4j-dev
mailing list