You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by shy guy <sh...@gmail.com> on 2006/11/03 18:15:25 UTC
Nullpointer !
I am using NullpointerException while logging error with log4j 1.2.14
hundreds of lines are printed in the log and console, before this error
occurs, so file configuration must be write
I m using it from inside RAD 6.0
logging line looks like
catch (ISPSvcException ise) {
-> logger.error("errrr", ise);
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Writer.java:144)
at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:47)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:308)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(
AppenderAttachableImpl.java:65)
at org.apache.log4j.Category.callAppenders(Category.java:203)
at org.apache.log4j.Category.forcedLog(Category.java:388)
at org.apache.log4j.Category.error(Category.java:319)
at com.prudential.sct.sdo.helper.DBAdapterHelperImpl.executeSP(
DBAdapterHelperImpl.java:251)
at com.prudential.sct.sdo.helper.test.CaseCreateTest.testCaseCreate(
CaseCreateTest.java:79)
at com.prudential.sct.sdo.helper.test.CaseCreateTest.main(
CaseCreateTest.java:35)
-k
Re: Nullpointer !
Posted by shy guy <sh...@gmail.com>.
I solved this one!
in ISPSvcException I had over-ridden printStackTrace
at one point it wrote null
log4j's VectorWriter added it in a String array
and later it tried to write it in a file and hence the NPE
Default PrintWriter is supposed to write a String object "null"
VectorWriter just ignores that fact, while over-riding !
-k
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org