java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
来源:互联网 发布:java执行sql查询语句 编辑:程序博客网 时间:2024/06/05 03:55
eclipse maven 项目,一直都运行得好好的,某天不知道具体做了什么操作,突然就开始报这个错,且eclipse中项目上有红叉提示错误,但是错误找不到,类似下图:
在eclipse Markers面板中,可以看到如下错误:
Cannot change version of project facet Dynamic web module to 3.0
这个时候,启动tomcat就会报错,java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener,但是可以确定项目中pom.xml文件中正确引用了相关jar包(关键之前一直都运行好好的)。
此时,进入eclipse集成tomcat的路径:eclipse设置的workspace目录下的 .metadata/.plugins/org.eclipse.wst.server.core 目录,里边的tmp0(如果eclipse中添加了多个tomcat,那么依次还会有tmp1、tmp2等目录),在进入部署的目录wtpwebapps目录,可以看到自己的项目根目录,进入WEB-INF/lib查看jar包,发现里边一个maven引用的jar包都没有。。。,所以报找不到类。
估计应该主要还是eclipse和maven集成还是有些问题。。
先处理Markers中的错误:Cannot change version of project facet Dynamic web module to 3.0,按照网上别人的方法,修改项目目录下.settings/org.eclipse.wst.common.project.facet.core.xml文件,将 <installed facet="jst.web" version="2.3"/>版本改为3.0即可。
然后在项目上执行 maven update project... 注意选中下边操作:
执行完后,发现项目上的红叉消失了。
再重新部署到tomcat启动,好了。
- 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
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- POJ - 3984(BFS)
- 黑客攻防入门(三)shellcode进阶
- Linux常用命令-1
- Python time模块详解
- Android:AS与Unity3D之间打包的各种坑及解决方案
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- 知识笔记【python Data Visualization 】
- javascript高级程序设计读书笔记 正则式
- Oracle查询表的锁定和解锁
- Model 层DAO的理解
- andriod studio在AMD下从零开始安装
- 指针函数与函数指针
- JavaWeb之JSP
- Python: 渐进猜数字游戏 <5> 控制语句