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

个人这个问题已经解决了,出现的问题从别人那里考一份,大致差很少:java

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

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

  1. 多是web.xml配置spring监听器 错误
  2. 把其余无关项目都关闭 tomcat下也删除
  3. 就是你碰到的少了spring 包

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

而后又清除了各类缓存,重启仍是那个问题。缓存

最终确认是第三种,可是若是单纯考进去还不行。tomcat

个人项目是maven项目,在tomcat下的webapps下生成的缓存中的lib里面少了不少包,解决方法是:app

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

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

                <attributes>maven

                        <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.清理工程

相关文章
相关标签/搜索