Can't run spring project from eclipse, ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
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:
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 :]
精彩评论