maven web 項目中啟動報錯java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener


環境:Groovy/Grails Tool Suite 3.1.0.RELEASE(BASED ON ECLIPSE JUNO 3.8.1)、JDK1.6、Maven3.05、Tomcat6

錯誤描述:

SEVERE: Error configuring application listener of class org.springframework.web.util.Log4jConfigListener
java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener

問題解析:

Maven項目中所有依賴(jdk/jar/classes)關系都被其管理。所以如果確定項目中確實存在該包或文件(org.springframework.web.util.Log4jConfigListener),那必定是項目沒有添加maven依賴所致。

解決方案:

ctrl+Enter 報錯項目->Deployment Assembly->Add->Java buid path entries->Next->Maven Dependencies

Clear!

此時Servers模塊中的相關項目模塊下多了個子節點spring-web-3.2.3.RELEASE.jar(web.xml中配置的Log4jConfigListener類所在的包)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM