> From: Leon Rosenberg [mailto:[EMAIL PROTECTED] > Subject: tomcat 5.5.16 does strange things with my log4j? > > I get null pointer exceptions in following code: > static{ > log = Logger.getLogger(QueuedEventSender.class); > } > static { > log = Logger.getLogger(TimerServiceImpl.class); > }
As part of the debugging effort, how about checking for null return values from getLogger() in the static initializer? Won't fix it, but might help track it down. Static fields won't be changed other than by your explicit code. It's also possible that the NPE is coming from somewhere deeper in the log.error() call, and just being propagated back to your code. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]