日期:2014-05-20  浏览次数:21153 次

在MyEclipse下,用Tomcat发布一个项目时报错!
2011-12-12 19:39:12 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0\bin;D:\Java\apache-tomcat-6.0.20\apache-tomcat-6.0.20\bin
2011-12-12 19:39:12 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2011-12-12 19:39:12 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 413 ms
2011-12-12 19:39:12 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2011-12-12 19:39:12 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.20
2011-12-12 19:39:12 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts-default.xml]
2011-12-12 19:39:12 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
2011-12-12 19:39:12 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts-plugin.xml]
2011-12-12 19:39:12 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts.xml]
2011-12-12 19:39:13 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\Java\apache-tomcat-6.0.20\apache-tomcat-6.0.20\webapps\CH07\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2011-12-12 19:39:14 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts-default.xml]
2011-12-12 19:39:14 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
2011-12-12 19:39:14 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts-plugin.xml]
2011-12-12 19:39:14 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts.xml]
2011-12-12 19:39:15 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2011-12-12 19:39:15 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2011-12-12 19:39:18 org.apache.struts.action.ActionServlet initChain
信息: Loading chain catalog from jar:file:/D:/Java/apache-tomcat-6.0.20/apache-tomcat-6.0.20/webapps/jsptest7/WEB-INF/lib/struts-core-1.3.8.jar!/org/apache/struts/chain/chain-config.xml
2011-12-12 19:39:19 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2011-12-12 19:39:19 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization started
2011-12-12 19:39:19 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1238785: display name [Root WebApplicationContext]; startup date [Mon Dec 12 19:39:19 CST 2011]; root of context hierarchy
2011-12-12 19:39:20 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
2011-12-12 19:39:21 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
信息: Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@1238785]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1cee792
2011-12-12 19:39:21 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1cee792: defining beans []; root of factory hierarchy
2011-12-12 19:39:21 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization completed in 2095 ms
2011-12-12 19:39:22 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-default.xml]
2011-12-12 19:39:22 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-plugin.xml]
2011-12-12 19:39:22 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts.xml]
2011-12-12 19:39:22 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Initializing Struts-Spring integration...
2011-12-12 19:39:22 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Setting autowire strategy to name
2011-12-12 19:39:22 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: ... initialized Struts-Spring integration successfully
2011-12-12 19:39:23 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.web.context.ContextLoader.<clinit>(ContextLoader.java:146)
at org.springframework.web.context.ContextLoaderListener.createContextLoader(ContextLoaderListener.java:53)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:44)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:987)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:909)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:495)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2011-12-12 19:39:23 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2011-12-12 19:39:23 org.apache.catalina.core.StandardContext start
严重: Context [/StrutsSpring.myeclipse.bak] startup failed due to previous errors
2011-12-12 19:39:23 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2011-12-12 19:39:23 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2011-12-12 19:39:23 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/15 config=null
2011-12-12 19:39:23 org.apache.catalina.startup.Catalina start
信息: Server startup in 11657 ms

------解决方案--------------------
探讨

把commons-logging-1.1.1这个引入