Can anyone help shed some light on this please? On 11/7/06, Chris Cheshire <[EMAIL PROTECTED]> wrote:
Hi,I am using log4j 1.2.13 in a web app deployed on SJAS 9. The logging is initialised in a ServletContextListener subclass in the contextInitialised method. String configFile = context.getInitParameter("log4j.config_file"); try { DOMConfigurator.configureAndWatch(configFile, 30000L); } catch (Exception ex) { throw new RuntimeException("unable to initialise log4j", ex); } This all works fine until I actually change the log4j config file, and then I see [#|2006-11-07T12:28:24.284-0800|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=49;_ThreadName=Thread-54;_RequestID=8b96aeb3-efe4-4c1b-8b6c-4222c1d99332;| java.lang.NullPointerException at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:168) at org.apache.log4j.xml.XMLWatchdog.doOnChange(DOMConfigurator.java:861) at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:88) at org.apache.log4j.helpers.FileWatchdog.run(FileWatchdog.java:107) |#] in the server log, one of these for each appender in the log file. Logging is subsequently broken and any further attempts yield errors stating that I am trying to write to a closed appender and I have to redeploy the web app for it to work again. How do I fix this? Thanks Chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
