A NPE occurs when reading a Log4J text log file.
The appender used is :
<appender class="org.apache.log4j.RollingFileAppender" name="INTERCEPTOR">
<param name="file" value="${log.instance.dir}/interceptors.log"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="5000KB"/>
<param name="maxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %m%n"/>
</layout>
</appender>
I am attaching an excerpt of the log file that caused the problem.
And the NPE displayed in the user interface :
Message:
java.lang.NullPointerException
Level:
SEVERE
Stack Trace:
null
net.sourceforge.vigilog.ui.filter.LogLevelThresholdEvaluator.evaluate(LogLevelThresholdEvaluator.java:32)
net.sourceforge.vigilog.ui.filter.LogLevelThresholdEvaluator.evaluate(LogLevelThresholdEvaluator.java:24)
ca.odell.glazedlists.ThresholdList$ThresholdComparator.compare(ThresholdList.java:309)
ca.odell.glazedlists.SortedList$ElementComparator.compare(SortedList.java:621)
ca.odell.glazedlists.impl.adt.barcode2.SimpleTree.insertIntoSubtreeInSortedOrder(SimpleTree.java:344)
ca.odell.glazedlists.impl.adt.barcode2.SimpleTree.addInSortedOrder(SimpleTree.java:315)
ca.odell.glazedlists.SortedList.insertByUnsortedNode(SortedList.java:347)
ca.odell.glazedlists.SortedList.setComparator(SortedList.java:427)
ca.odell.glazedlists.SortedList.<init>(SortedList.java:103)
ca.odell.glazedlists.ThresholdList.<init>(ThresholdList.java:80)
net.sourceforge.vigilog.ui.LogFilePanel.getLogEntriesList(LogFilePanel.java:604)
net.sourceforge.vigilog.ui.LogFilePanel.<init>(LogFilePanel.java:114)
net.sourceforge.vigilog.ui.welcome.LoadLogFileLoaderCallable.postProcess(LoadLogFileLoaderCallable.java:50)
net.sourceforge.vigilog.ui.LogFileLoaderCallable.call(LogFileLoaderCallable.java:109)
net.sourceforge.vigilog.ui.LogFileLoaderCallable.call(LogFileLoaderCallable.java:42)
java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
java.util.concurrent.FutureTask.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
log file snippet