开发者

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

开发者 https://www.devze.com 2023-02-22 13:13 出处:网络
I\'m having trouble running my spring project from inside Eclipse. This is the error I g开发者_Go百科et:

I'm having trouble running my spring project from inside Eclipse.

This is the error I g开发者_Go百科et:

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

Here are the Tomcat settings:

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

I don't understand why it's not working, the spring classes are included in the classpath.


You need the spring-web jar. I see you're using maven:

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

NOTE: that the latest release is 3.0.5.RELEASE. Also, you can identify the spring project by the package, i.e. org.springframework.web


I encountered the same error. I went to project properties/deployment assembly then added my spring library. I also have my spring library on my project build path.

Worked for me. Hope this helps :]

0

精彩评论

暂无评论...
验证码 换一张
取 消