2011-04-05 159 views
0

我在运行Eclipse内部的Spring项目时遇到了问题。无法从eclipse运行spring项目,ClassNotFoundException:org.springframework.web.context.ContextLoaderListener

这是错误我得到:

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

这里是Tomcat的设置:

Here are the settings

我不明白为什么它不工作,弹簧类都包含在类路径。

回答

1

你需要弹簧网罐。我看你使用的是maven:

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

注:最新版本是3.0.5.RELEASE。此外,您可以通过包确定弹簧项目,即org.springframework.web

1

我遇到了同样的错误。我去了项目属性/部署程序集,然后添加了我的弹簧库。我的项目构建路径上也有我的弹簧库。

为我工作。希望这有助于:]