Bidvertiser

Monday, June 17, 2013

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

I got this exception while I was trying to execute an open source application that I found from the web. I was trying to run the application from my eclipse managed tomcat 7 server. I noticed that my project's maven dependencies were not having the right jars.
This problem can be fixed by adding maven dependencies in the project's web deployment assembly.
  1. Open the project's properties (e.g., right-click on the project's name in the project explorer and select "Properties")
  2. Select "Deployment Assembly"
  3. Click the "Add..." button on the right margin
  4. Select "Java Build Path Entries" from the menu of Directive Type and click "Next"
  5. Select "Maven Dependencies" from the Java Build Path Entries menu and click "Finish".
You should see "Maven Dependencies" added to the Web Deployment Assembly definition after the following the above steps.

No comments:

Post a Comment