簡體   English   中英

無法從eclipse運行spring項目,ClassNotFoundException:org.springframework.web.context.ContextLoaderListener

[英]Can't run spring project from eclipse, ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

我在Eclipse內部運行spring項目時遇到了麻煩。

這是我得到的錯誤:

SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

以下是Tomcat設置:

這是設置

我不明白為什么它不起作用,spring類包含在類路徑中。

你需要彈簧網罐。 我看到你正在使用maven:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>3.0.5.RELEASE</version>
</dependency>

注意:最新版本是3.0.5.RELEASE。 此外,您可以通過包識別spring項目,即org.springframework.web

我遇到了同樣的錯誤。 我去了項目屬性/部署程序集,然后添加了我的spring庫。 我的項目構建路徑上也有我的spring庫。

為我工作。 希望這可以幫助 :]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM