严重: 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.initWebApplicationContext(ContextLoader.java:269)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 17 more
Mar 6, 2012 12:17:39 PM org.apache.catalina.core.StandardContext start
请问这个是怎么回事?在线等待,,,,
------解决方案--------------------------------------------------------
配置监听,初始化没有找到所需的监听
------解决方案--------------------------------------------------------
是不是少配了这个?
<listener>
<description>Spring 监听器</description>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
------解决方案--------------------------------------------------------
缺少jar包,添加jar包就可以啦,commons-logging
------解决方案--------------------------------------------------------
要学会看错误信息,一般都是前几行,
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
这里提示找不到类,这时候你去看他找不到什么类,
然后百度搜索“org/apache/commons/logging/LogFactory”,不出意外的话之前这种很普遍的问题之前应该会有别人也遇到过,所以肯定有相应的解决方法,之后根据解决方法去做就可以了。