您的位置:首页 > 编程语言 > Java开发

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderL问题解决方法

2017-03-03 00:00 886 查看
我的这个问题已经解决了,出现的问题从别人那里考一份,大体差不多:

java.lang.ClassNotFoundException: org.springframeworntext.ContextLoaderL
严重: Error configuring application listener of class org.springframeworntext.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframeworntext.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at orre.StandardContext.listenerStart(StandardContext.java:3770)

出现这个问题时候第一步的确是像别人说的那样

可能是web.xml配置spring监听器 错误

把其他无关项目都关闭 tomcat下也删除

就是你碰到的少了spring 包

按照这个顺序,首先检查了spring的各种配置,都没问题。

然后又清除了各种缓存,重启还是那个问题。

最终确认是第三种,但是如果单纯考进去还不行。

我的项目是maven项目,在tomcat下的webapps下生成的缓存中的lib里面少了很多包,解决方法是:

1.首先在项目的工作空间中找到.classpath文件,找到并添加一句话:

<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">

<attributes>

<attribute name="maven.pomderived" value="true"/>

<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>

</attributes>

</classpathentry>

把上面绿色的一句话加上

2.在eclipse中项目上右键——>Properties——>Java Build Path——>Order and Export,勾选maven dependencies,apply 然后确认。

3.清理工程
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐