tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Armbrust <>
Subject Re: How to debug Error: listenerStart?
Date Thu, 02 Apr 2009 18:57:17 GMT
On Thu, Apr 2, 2009 at 1:00 PM, Caldarale, Charles R
<> wrote:
>> From: Dan Armbrust []
>> Subject: Re: How to debug Error: listenerStart?
>> There is obviously some interaction going on between my webapp
>> and tomcat's logging system that I don't know about.
> Many Tomcat components associated with a specific webapp will use the webapp's logger.
 If your log4j initialization fails (which appeared to be the case), there may well be no
where to put the messages.  You can try removing the log4j usage from your webapp (probably
too hard), or correct its initialization so that it is available.
>  - Chuck

I don't know if my log4j initialization is failing, or if there is
just a gap in time where tomcat sees that my webapp is using log4j -
but my webapp has not yet had a chance to init log4j - my webapp
dynamically configures log4j with a pattern like this:


fairly early in it's startup sequence.  But, when I get a
listenerStart error, I know that this code hasn't yet executed (due to
a missing system.out message)

This also seems to fit with that other warning I get during the startup:

INFO: Deploying web application archive ap.war
log4j:WARN No appenders could be found for logger
log4j:WARN Please initialize the log4j system properly.
logPath: /opt/NetProvision/nn/log/

The 4th line, above, is printed when my log4j sequence completes.  So
it would appear that something within my webapp tried to log using
log4j, but log4j wasn't yet configured - hence the warning about the
missing appender.

What would I need to do to make log4j within my webapp have a
temporary configuration which would log to the console until the point
when my webapp executes it's dynamic configuration?

I'll have to hunt through all of my 3rd party jar files... I wonder if
one of them has a log4j config file that is being picked up.

Thanks for all the feedback.  I'm a whole lot closer to the real
source of this problem than I was when I started tracking it down.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message