码迷,mamicode.com
首页 > 编程语言 > 详细

maven ClassNotFoundException: org.springframework.web.context.ContextLoaderL

时间:2015-06-21 13:04:35      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:

信息: 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

  

出现这一问题的原因是tomcat再发布web项目时,并没有将maven的依赖包一起随项目的编译一并进行打包。

解决方案:(eclipse)

1.在项目上右击 --> Properties

2.选择Deployment Assembly,在右边点击Add按钮,在弹出的窗口中选择Java Build Path Entries

3.点击Next,选择Maven Dependencies(或者是选中pom.xml文件中规定的的所有依赖包)

4.点击Finish,然后可以看到已经把Maven Dependencies添加到Web应用结构中了

maven ClassNotFoundException: org.springframework.web.context.ContextLoaderL

标签:

原文地址:http://www.cnblogs.com/qufanblog/p/4591779.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!