logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pat Farrell <pfarr...@pfarrell.com>
Subject bizarre NPE exception
Date Fri, 13 Nov 2009 16:41:33 GMT
I've got a WorkingSetCache daemon implementation that works great. But
every so often, when the server is not doing anything, I get what looks
like a spurious NPE stackdump from Log4J.

It makes no sense, I can't figure out what the problem is.

In my class, I have code:

    } catch (RuntimeException e) {
        if (pboLogger != null && e != null)
				pboLogger.error("factory error", e);
    }

which triggers the error. Seems pretty clear to me that my null tests
are making sure that my code is not the problem.

Anybody got a clue what I'm doing wrong?
I'll put the whole stacktrace below

pat

log4j:ERROR Error occured while converting date.
java.lang.NullPointerException
        at java.lang.System.arraycopy(Native Method)
        at
java.lang.AbstractStringBuilder.getChars(AbstractStringBuilder.java:328)
        at java.lang.StringBuffer.getChars(StringBuffer.java:201)
        at
org.apache.log4j.helpers.AbsoluteTimeDateFormat.format(AbsoluteTimeDateFormat.java:119)
        at java.text.DateFormat.format(DateFormat.java:316)
        at
org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:444)
        at
org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:65)
        at org.apache.log4j.PatternLayout.format(PatternLayout.java:502)
        at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:302)
        at org.apache.log4j.WriterAppender.append(WriterAppender.java:160)
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
        at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
        at org.apache.log4j.Category.callAppenders(Category.java:206)
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.error(Category.java:322)
        at
com.pfarrell.busobj.PersistentBusinessObject.factoryFromQueryString(PersistentBusinessObject.java:163)
        at
com.pfarrell.utils.collections.DatabaseCache.processAll(DatabaseCache.java:124)
        at
com.pfarrell.utils.collections.WorkingSetCache.run(WorkingSetCache.java:145)
        at java.lang.Thread.run(Thread.java:619)
-- 
Pat Farrell
http://www.pfarrell.com/


---------------------------------------------------------------------
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