真正解决问题: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 ...
随机推荐
- Chrome 没有注册类
妈蛋这个问题折腾了好久,百度都是噼里啪啦什么什么进入注册表什么的删除啊 操 看着难受死了 这边也有这个些 没有注册类原因什么的的百度一下就有了 解决办法 管理员身份运行CMD 输入 REG DELE ...
- Build subversion 1.8 with SSL on OS X Yosemite
mkdir -p /tmp/buildroot && cd /tmp/buildroot # Need to build the latest libtool and automake ...
- 如何在IDEA上 添加GIT和maven、mybatis插件
IDEA工具上,添加GIT和maven.mybatis插件,相对比较简单: 首先下载GIT.maven.mybatis. 先添加GIT插件: 首先在IDEA找到file中找到setting,然后搜索g ...
- [转]:C#的ToString如何格式化字符串
C 货币 2.5.ToString("C") ¥2.50 D 十进制数 25.ToString("D5") 00025 E 科学型 25000.ToString ...
- redis集群同步迁移方法(一):通过redis replication实现
讲到redis的迁移,一般会使用rdb或者aof在主库做自动重载到目标库方法.但该方法有个问题就是无法保证源节点数据和目标节点数据保持一致,一般线上环境也不允许源库停机,所以要在迁移过程 ...
- redis 基本数据类型
概述 Redis的键值可以使用物种数据类型:字符串,散列表,列表,集合,有序集合.本文详细介绍这五种数据类型的使用方法.本文命令介绍部分只是列举了基本的命令,至于具体的使用示例,可以参考Redis官方 ...
- java泛型编译时被擦除引起多态的破坏,用 桥方法解决此类问题。(java 桥方法)
在JVM虚拟机中泛型编译的时候,会出现类型擦除.但是,在多态场景中,编译时,擦除方式会出现多态被破坏的可能. 举个栗子: A.java public class A<T> { void g ...
- netstat命令
netstat命令会罗列出当前所有的网络连接.连接统计以及路由表信息.默认情况下,netstat命令将罗列出本地计算机所有开启的端口情况,以及它所连接的外部计算机情况. 端口就像一所房子的房门一样.数 ...
- 在Windows和Linux上安装paramiko模块以及easy_install的安装方法
一.paramiko模块有什么用? paramiko是用python语言写的一个模块,遵循SSH2协议,支持以加密和认证的方式,进行远程服务器的连接.由于使用的是python这样的能够跨平台运行的语言 ...
- Windows 2008 server IIS 7 中开启CGI, ISAPI
默认情况下,IIS是没有开启的,需要通过下面的步骤开启