Such exceptions are often encountered when using eclipse to consolidate SPRINGMVC: java.lang.classnotfoundexception:o Rg.springframework.web.context.ContextLoaderListener
This means that you cannot find the jar package, and if you are using the MAVEN management jar package, you will find that the jar Bao Mingming is already there, but it is still an error; If the MVN package generates a war pack released to Tomcat, you will find that the project is not a problem.
1. One of the possible reasons for this problem is that the Spring jar package is not loaded, and sometimes it does not occur when the jar package of spring is not copied, but when you copy it, the error does not disappear, indicating that the jar package is not loaded. Remember that spring's jar package must be placed in the project Lib to avoid this error.
2. Duplicate class libraries are used and the versions are inconsistent. Causes the lower version to be used preferentially. For example, today encountered a situation in the Tomcat server using the Axis2.war package, when starting Tomcat, the Axis2.war package will be automatically decompressed, and then the project package has the relevant spring package, so when there is another project to spring, it is possible to go to Axis2 Spring Package, if the version inconsistency causes the problem, the workaround is to leave the project unaffected by the AXIS2 project package.
3. If it is not the above two reasons, then you can try the following solution:
Reference from: Http://stackoverflow.com/questions/6322711/tomcat-spring-web-class-not-found-exception-org-springframework-web-context
Add..
Then restart the project.
Really solve the problem: Maven Eclipse Tomcat java.lang.ClassNotFoundException: Org.springframework.web.context.ContextLoaderListener