I have a web application running in Tomcat 5.5.27 with JDK 1.5.0_16-b02
on Windows XP SP3. log4j-1.2.15.jar and commons-logging-1.1.1.jar are
installed in WEB-INF/lib and there is a context.xml file in META-INF.

When packaged as a war file this combination reliably produces the
exception shown below in the Tomcat console under the following
circumstances:

1. deploy the war file (e.g. using Tomcat HTTP manager)

2. stop and restart tomcat

3. undeploy the war file

4. deploy the war file


Note that to demonstrate this it is necessary to have both a context.xml
file in META-INF and commons-logging-1.1.1.jar in WEB-INF/lib. Also, the
problem disappears if you downgrade to commons-logging-1.0.4. Otherwise
the contents of the application don't seem to matter - it can be
demonstrated in an application containing no classes or other libraries.

The only other thing I've found to have an effect is the *name* of the
application. "commons-logging-test" exhibits the problem, but in at
least one test renaming the same application to start with a letter
later in the alphabet did not (possibly to do with the order
applications are loaded)?

I suspect this is a bug either in Tomcat or the logging sub-system, but
these things are notoriously tricky and before reporting it as such any
comments or help would be very welcome.

Thanks, John.

===

29-Jan-2009 21:07:43 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive commons-logging-test.war
29-Jan-2009 21:07:43 org.apache.catalina.core.StandardContext processTlds
SEVERE: Error reading tld listeners java.lang.NullPointerException
java.lang.NullPointerException
        at org.apache.log4j.Category.isEnabledFor(Category.java:749)
        at
org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogg
r.java:333)
        at
org.apache.catalina.startup.TldConfig.tldScanResourcePaths(TldConfig
java:581)
        at
org.apache.catalina.startup.TldConfig.execute(TldConfig.java:282)
        at
org.apache.catalina.core.StandardContext.processTlds(StandardContext
java:4307)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:
144)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBas
.java:760)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:7
0)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544

        at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831

        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:51
)
        at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1232)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java
458)
        at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataIm
l.java:213)
        at
com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Default
BeanServerInterceptor.java:815)
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:78
)
        at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java
1397)
        at
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.jav
:635)
        at
org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java
424)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App
icationFilterChain.java:269)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Application
ilterChain.java:188)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper
alve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContext
alve.java:172)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentic
torBase.java:525)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.
ava:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.
ava:117)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVa
ve.java:108)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.ja
a:174)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.jav
:875)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.
rocessConnection(Http11BaseProtocol.java:665)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndp
int.java:528)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFo
lowerWorkerThread.java:81)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread
ool.java:689)
        at java.lang.Thread.run(Thread.java:595)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to