On Thu, Apr 2, 2009 at 1:00 PM, Caldarale, Charles R <[email protected]> wrote: >> From: Dan Armbrust [mailto:[email protected]] >> 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: LogManager.resetConfiguration(); PropertyConfigurator.configure(properties); 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 (org.apache.commons.digester.Digester). 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. Dan --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
