reset password
Author Message
kevossus
Posts: 6
Posted 19:29 Nov 02, 2013 |

Hi Professor, 

While trying to debug my project by compiling and clicking "Run On Server" I get a Class Not Found Error for ContextLoaderListener, java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener. When I copy the target files by hand into the Tomcat server everything works fine. The issue is only when I want to compile and "Run On Server" from inside Eclipse. 

Has anyone come across this? I've tried to clean the Tomcat server environment and the Working Directory but I still get this error. Maven Dependencies are included in the Project Build.

Last edited by kevossus at 19:29 Nov 02, 2013.
cysun
Posts: 2935
Posted 23:48 Nov 02, 2013 |

Check out springmvc from the sample repository and run it. If you get the same error when running springmvc, it's probably because the library was not downloaded properly. You can do the following:

  • Exit Eclipse.
  • Delete the folder $USER\.m2\repository\org\springframework\spring-web
  • Restart Eclipse, wait until the library is downloaded, then try again.