信息: Starting Servlet Engine: Apache Tomcat/6.0.32 2012-3-31 9:39:40 org.apache.catalina.core.StandardContext listenerStart 严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4148) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 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:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 2012-3-31 9:39:40 org.apache.catalina.core.StandardContext listenerStart 严重: Skipped installing application listeners due to previous error(s) 2012-3-31 9:39:40 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 出现这个问题的原因是没有找到这个class文件是maven项目如果确保这个org.springframework.web.context.ContextLoaderListener已经存在那出现这一问题的原因就是tomcat在发布web项目的的时候,并没有将maven的依赖包一起随着项目的编译一并进行打包解决方法:
- 在项目上点击--》properties
- 选择Deployment Assembly,在右面点击ADD按钮,在弹出的窗口中选择Java Build Path Entries
- 点击Next,选择Maven Dependencies(或者选中pom.xml文件中规定的所有依赖包)
- 点击Finish,然后可以看到已经把Maven Dependencies添加到web应用结构中
- 重新启动tomcat,测试
时间: 2024-10-27 07:39:52