The abovementioned code is executed approx. 10 times a second from the
beggining and never fails except when downing tomcat...

I also see the log entries in the log file, so the logging works
during the lifetime of the application.

Forgot to mention, but all of the NPEs happen in threads. The timer is
a daemon thread, the queuedeventsender a non-daemon thread.


> 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.
Yes, I had one further exception where it happened in jdk code itself
(somewhere in a buffer), still, if the stacktraces don't lie I got one
npe in
if (log.isDebugEnabled()) and I think it can only happen if log is null?

regards
Leon

On 4/26/06, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
> > 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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to