真正解决问题:maven eclipse tomcat java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
在使用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..
再重新启动项目即可。
真正解决问题:maven eclipse tomcat java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener的更多相关文章
- 真正解决问题:maven eclipse tomcat java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener--转
原文地址:http://www.cnblogs.com/amosli/p/4067665.html 在使用eclipse进行整合springmvc时经常会碰到这样的异常: java.lang.Clas ...
- 【转】maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
http://blessht.iteye.com/blog/1104450 http://www.cnblogs.com/zhouyalei/archive/2011/11/30/2268606.ht ...
- maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
maven 导入项目中经常出现这个问题 严重: Error configuring application listener of class org.springframework.web.cont ...
- maven 项目启动tomcat报错 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
maven项目启动tomcat报错: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi ...
- 使用eclipse启动tomcat里的项目时报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
1.这种错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener刚开始看的时候 ...
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener【转】
部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi ...
- 在eclipse中运行spring web application时的异常: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis ...
- maven创建spring项目之后,启动报错java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
出错情景:maven中已经加载了spring的核心包,但是项目启动时,报错: org.apache.catalina.core.StandardContext listenerStart严重: Err ...
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener,环境Spring+Maven
记录一下莫名出现的错误.Spring+Maven+STS. 严重: Error configuring application listener of class org.springframewor ...
随机推荐
- The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
右击web工程->属性或Build Path->Java Build Path->Libraries-> Add Libray...->Server Runtime -& ...
- C#多文档程序中如何只打开一个子窗口
using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; na ...
- 软件调试——CPU异常列表
CPU异常主要分为三类:错误类异常,陷阱类异常和终止类异常 1 错误类异常 Fault CPU遇到该类异常后,会先将CS和EIP(当前发生错误的指令,而不是下一条指令)压栈,然后跳到异常处理函数中,执 ...
- MySQL之账户管理
MySQL之账户管理 账户管理是MySQL用户管理最基本的内容.包括登录,退出MySQL服务器.创建用户.删除用户.密码管理和权限管理等内容. 其中登录方式非常简单,在这个地址有:http://www ...
- ZXingObjC 64位 集成到自己的项目中(xcode 6.4)
参考 http://www.cocoachina.com/bbs/read.php?tid-280058-page-1.html 楼主发的DEMO中 ZXingObjC 支持64位 但是是以项目形 ...
- 【zZ】OpenCV HOGDescriptor 参数图解
http://blog.csdn.net/raodotcong/article/details/6239431
- webForm中的验证控件
1.非空验证控件:RequireFieldValidator :2.数据比较验证:CompareValidator :3.数据范围验证:RangeValidator :4.正则表达式验证:Regul ...
- POJ(2187)用凸包求最远点对
Beauty Contest http://poj.org/problem?id=2187 题目描述:输入n对整数点,求最距离远的点对,输出他们距离的平方和 算法:拿到这个题,最朴素的想法就是用2层循 ...
- Getting Started
https://developers.google.com/v8/get_started Getting Started This document introduces some key V8 co ...
- Peterson算法
#define FALSE 0 #define TRUE 1 #define N 2 /*进程数量 */ int turn; /* 现在轮到谁 */ int interested[N]; /*所有值初 ...