我想在tomcat中,启动spring容器,但是初始化老是报错
2007-3-26 11:16:22 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.
2007-3-26 11:16:23 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2007-3-26 11:16:23 org.apache.catalina.core.StandardContext start
严重: Context [/vseaf] startup failed due to previous errors
2007-3-26 11:16:23 org.apache.catalina.core.StandardContext processTlds
严重: Error reading tld listeners java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.log4j.Category.isEnabledFor(Category.java:746)
at org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogger.java:327)
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:4302)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4139)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2007-3-26 11:16:23 org.apache.coyote.http11.Http11BaseProtocol start
------解决方法--------------------------------------------------------
这个问题的解决方法是:
把文件commons-logging.jar 从1.1 版本替换到1.0.4版本.
具体见 http://blog.tremend.ro/2007/05/09/error-reading-tld-listeners-javalangnullpointerexception/
--- aummn (canglangke001@hotmail.com)