Menu

#2 RTLogger.init() not called

open
nobody
None
5
2001-12-19
2001-12-19
No

I tried to use jylog in listening mode, logging only a
single method. It failed, throwing
NullPointerExceptions like this:

Exception at:>>>>>>> nodeAdded
java.lang.NullPointerException
at
jylog.debugger.logger.XMLLogger.logMethodEntry
(XMLLogger.java:88)
at
jylog.debugger.listeners.logevents.LogMethodEntry.log
(LogMethodEntry.java:48)
at
jylog.debugger.listeners.logevents.LogMethodEntry.event
Occured(LogMethodEntry.java:26)
at
jylog.debugger.listeners.VMEventListenerDefaultImpl.eve
ntOccurred(VMEventListenerDefaultImpl.java:28)
at
jylog.debugger.listeners.VMEventListenerManager.process
Event(VMEventListenerManager.java:208)
at
jylog.debugger.listeners.VMEventListenerManager.run
(VMEventListenerManager.java:338)
at java.lang.Thread.run(Unknown Source)

It turns out that the instance variable doc (a DOM
Document object) is null at that point. That, in
turn, is true because XMLLogger.init() was never
called. That (or grep actually :)) brought me to
PublicUI.java, the only place where RTLogger.init() is
called. It turns out that the code only calls init in
SetMainClassActionListener on line 436. Since I was
using listening mode, this code block was never
entered.

Thanks,
Matt

Discussion


Log in to post a comment.

Auth0 Logo