You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/02/26 16:03:43 UTC
DO NOT REPLY [Bug 50835] New: NPE on AccessLogValve.getTimeZone
https://issues.apache.org/bugzilla/show_bug.cgi?id=50835
Summary: NPE on AccessLogValve.getTimeZone
Product: Tomcat 6
Version: 6.0.32
Platform: Macintosh
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: based@free.fr
26 févr. 2011 15:43:54 org.apache.catalina.connector.CoyoteAdapter service
.lang.NullPointerException
at
org.apache.catalina.valves.AccessLogValve.getTimeZone(AccessLogValve.java:764)
at
org.apache.catalina.valves.AccessLogValve.access$800(AccessLogValve.java:122)
at org.GRAVE: Une exception ou une erreur s'est produite dans le conteneur
durant le traitement de la requête
javaapache.catalina.valves.AccessLogValve$DateAndTimeElement.addElement(AccessLogValve.java:1008)
at org.apache.catalina.valves.AccessLogValve.log(AccessLogValve.java:575)
at
org.apache.catalina.core.ContainerBase.logAccess(ContainerBase.java:1214)
at
org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:562)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:296)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:680)
server.xml change:
<Context path="/aa" docBase="aa" debug="true" reloadable="true"
crossContext="true" >
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="localhost_access_aa1_log." suffix=".txt"
pattern="common"/>
</Context>
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50835] NPE on AccessLogValve.getTimeZone
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50835
--- Comment #2 from based <ba...@free.fr> 2011-02-26 11:41:40 EST ---
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.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50835] NPE on AccessLogValve.getTimeZone
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50835
Chuck Caldarale <ch...@unisys.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
--- Comment #3 from Chuck Caldarale <ch...@unisys.com> 2011-02-26 11:48:41 EST ---
(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.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50835] NPE on AccessLogValve.getTimeZone
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50835
Konstantin Kolinko <kn...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version| |All
--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> 2011-02-26 11:04:19 EST ---
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.)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org