Summary: | NPE on AccessLogValve.getTimeZone | ||
---|---|---|---|
Product: | Tomcat 6 | Reporter: | based <based> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 6.0.32 | ||
Target Milestone: | default | ||
Hardware: | Macintosh | ||
OS: | All |
Description
based
2011-02-26 10:03:36 UTC
I cannot reproduce it. In what circumstances this was observed? Are there other errors and warnings or interesting messages in the logs? Did tomcat start successfully? From the source, it can happen only of AccessLogValve#timezone is null, but that field is initialized in AccessLogValve#start(). Is it possible that the AccessLogValve#log() call happened before #start() was called? Maybe context itself failed to start and thus initialization did not complete? (BTW, there should be at least one WARNING there, because there is no "debug" attribute in a Context.) I cannot reproduce it. In what circumstances this was observed? Are there other errors and warnings or interesting messages in the logs? Did tomcat start successfully? > I tried to deployed a new apllication with H2 database inside. I had problem with reloadable="true"and a catalina defined context for the same application: aa.xml <Context path="aa" reloadable="true" docBase="M/webapp" workDir="M/work" > <Logger className="org.apache.catalina.logger.SystemOutLogger" verbosity="4" timestamp="true"/> <Loader className="org.apache.catalina.loader.DevLoader" reloadable="true" debug="1" useSystemClassLoaderAsParent="false" /> </Context> From the source, it can happen only of AccessLogValve#timezone is null, but that field is initialized in AccessLogValve#start(). Is it possible that the AccessLogValve#log() call happened before #start() was called? Maybe context itself failed to start and thus initialization did not complete? (BTW, there should be at least one WARNING there, because there is no "debug" attribute in a Context.) > Sorry, it was a configuration issue with the aa.xml in catalina/localhost folder, it is now working as expected. You can close the issue, if you want. (In reply to comment #2) > aa.xml > <Context path="aa" reloadable="true" docBase="M/webapp" workDir="M/work" > > <Logger className="org.apache.catalina.logger.SystemOutLogger" > verbosity="4" timestamp="true"/> > <Loader className="org.apache.catalina.loader.DevLoader" reloadable="true" > debug="1" useSystemClassLoaderAsParent="false" /> > </Context> You really need to spend some time with the current Tomcat documentation. For example, the <Logger> element has not been used in many years. You cannot blindly copy configuration settings from older versions of Tomcat into a newer one and expect anything close to reliable results. |