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

相關文章
相關標籤/搜索