maven java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
来源:互联网 发布:软件企业人才需求 编辑:程序博客网 时间:2024/05/22 14:43
在使用eclipse进行整合springmvc时经常会碰到这样的异常: java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener
这时里的意思是说找不到jar包,如果使用的是maven管理jar包,会发现jar包明明已经有了,但还是报错;如果mvn package生成一个war包发布到tomcat下面会发现,其实项目是没问题的。
1.出现这个问题的原因有可能的其中一点就是spring的jar包没有被加载,有的时候没有拷spring的jar包会出现这个错误,但是当你拷了以后这个错误并没有消失的时候就说明jar包没有被加载,切记spring的jar包一定要放在工程的lib下这样才能避免这个错误的发生。
2.使用了重复的类库,且版本不一致。导致低版本的被优先使用。比如今天遇到一种情况在tomcat服务器使用了axis2.war包,当启动tomcat的时候,axis2.war包会自动解压,之后再该项目包里有相关的spring包,所以当有另外一个工程要到spring时,就有可能要到axis2的spring包,如果版本不一致就会导致该问题,解决的方法就是让该项目不受axis2项目包的影响。
3.如果不是上面两种原因,那么可以试一下下面的解决方案:
参考自:http://stackoverflow.com/questions/6322711/tomcat-spring-web-class-not-found-exception-org-springframework-web-context
Add..
再重新启动项目即可。
转自:http://www.csdn123.com/html/topnews201408/77/6177.htm
- maven java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- Maven工程 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 问题原因。
- 关于java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误解决方案
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- Java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- Android应用的性能问题
- Python 3中套接字编程中遇到TypeError: 'str' does not support the buffer interface的解决办法
- Java进阶(十二)JDK版本错误之Unsupported major.minor version 51.0(jdk版本错误)
- Swift学习笔记(二十六)——扩展
- 双链表的基本操作
- maven java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- Android串口通信:串口读写实例
- [ASM]Linux x86_64平台汇编实例
- 搜索引擎核心读书心得1:爬虫质量的3个标准
- 清除浮动方法及优缺点
- 谁是Windows 10中国市场的赢家?
- WebSphere MQ7.5教程——教程 2:将消息发送至远程队列
- Redis报错:ERR Operation against a key holding the wrong kind of value 解决处理
- Clustering Tips