You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Paul Smith <Pa...@lawlex.com.au> on 2003/05/22 00:00:40 UTC
Chainsaw2 & latest log4j-core jar error
[This is mainly for Ceki & Scott, re: the changes to the LoggingEvent
constructor and ThrowableInformation.]
Hi all, this morning I downloaded the latest jakarta-log4j module and built
the jar, and used this new jar as the core library for Chainsaw2. When I
open up a test XML source file in Chainsaw2 I am getting this error msg:
[java] java.lang.NullPointerException
[java] at
org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInform
ation.java:93)
[java] at
org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(LoggingEvent.java:512)
[java] at
org.apache.log4j.chainsaw.ChainsawAppenderHandler.convert(ChainsawAppenderHa
ndler.java:190)
[java] at
org.apache.log4j.chainsaw.ChainsawAppenderHandler.access$2(ChainsawAppenderH
andler.java:124)
[java] at
org.apache.log4j.chainsaw.ChainsawAppenderHandler$WorkQueue$WorkerThread.run
(ChainsawAppenderHandler.java
Line 93 of ThrowableInformation in the log4j-core is:
throwable.printStackTrace(vw);
>From a log4j-core side, looks like internal throwable member is null as well
as the rep String[]... Now the question is, should thus be caught in the
constructor of ThrowableInformation as an IllegalArgumentException? Or are
there performance considerations there? Or are we allowed to have a kinda
'null-ish' ThrowableInformation?
>From a chainsaw side, if the is no exception msg in the XML events, then in
line 378-ish of the log4j.net.XMLDecoder class in the log4j-sandbox will be
attempting to construct a ThrowableInformation with a null value. What
should we do here? I'm not quite sure.
I'm happy to submit any changes, I'm just not sure what they should be.
cheers,
_________________________
Paul Smith
Lawlex Compliance Solutions
phone: +61 3 9278 1511
email: paul.smith@lawlex.com.au
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
Re: Chainsaw2 & latest log4j-core jar error
Posted by Ceki Gülcü <ce...@qos.ch>.
Paul,
I'd like to reproduce this. Could you please indicate the command you are
executing and provide the XML source file you are reading?
At 08:00 AM 5/22/2003 +1000, you wrote:
>[This is mainly for Ceki & Scott, re: the changes to the LoggingEvent
>constructor and ThrowableInformation.]
>
>Hi all, this morning I downloaded the latest jakarta-log4j module and built
>the jar, and used this new jar as the core library for Chainsaw2. When I
>open up a test XML source file in Chainsaw2 I am getting this error msg:
>
> [java] java.lang.NullPointerException
> [java] at
>org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInform
>ation.java:93)
> [java] at
>org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(LoggingEvent.java:512)
> [java] at
>org.apache.log4j.chainsaw.ChainsawAppenderHandler.convert(ChainsawAppenderHa
>ndler.java:190)
> [java] at
>org.apache.log4j.chainsaw.ChainsawAppenderHandler.access$2(ChainsawAppenderH
>andler.java:124)
> [java] at
>org.apache.log4j.chainsaw.ChainsawAppenderHandler$WorkQueue$WorkerThread.run
>(ChainsawAppenderHandler.java
>
>Line 93 of ThrowableInformation in the log4j-core is:
>
>throwable.printStackTrace(vw);
>
> >From a log4j-core side, looks like internal throwable member is null as well
>as the rep String[]... Now the question is, should thus be caught in the
>constructor of ThrowableInformation as an IllegalArgumentException? Or are
>there performance considerations there? Or are we allowed to have a kinda
>'null-ish' ThrowableInformation?
>
> >From a chainsaw side, if the is no exception msg in the XML events, then in
>line 378-ish of the log4j.net.XMLDecoder class in the log4j-sandbox will be
>attempting to construct a ThrowableInformation with a null value. What
>should we do here? I'm not quite sure.
>
>I'm happy to submit any changes, I'm just not sure what they should be.
>
>cheers,
>
>_________________________
>Paul Smith
>Lawlex Compliance Solutions
>phone: +61 3 9278 1511
>email: paul.smith@lawlex.com.au
--
Ceki For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org