It is difficult to modify. class. project on the Internet, and sometimes it may not work. The following method is suitable for projects that have referenced jar, but ClassNotFound is used at runtime. Try the following method:
Severe: Error Processing ing application listener of class org. springframework. web. context. contextLoaderListenerjava. lang. classNotFoundException: org. springframework. web. context. contextLoaderListenerat org. apache. catalina. loader. webappClassLoader. loadClass (WebappClassLoader. java: 1678) at org. apache. catalina. loader. webappClassLoader. loadClass (WebappClassLoader. java: 1523) at org. apache. catalina. core. defaultInstanceManager. loadClass (DefaultInstanceManager. java: 415) at org. apache. catalina. core. defaultInstanceManager. loadClassMaybePrivileged (DefaultInstanceManager. java: 397) at org. apache. catalina. core. defaultInstanceManager. newInstance (defainstinstancemanager. java: 118) at org. apache. catalina. core. standardContext. listenerStart (StandardContext. java: 4660) at org. apache. catalina. core. standardContext $1. call (StandardContext. java: 5226) at org. apache. catalina. core. standardContext $1. call (StandardContext. java: 5221) at java. util. concurrent. futureTask $ Sync. innerRun (FutureTask. java: 303) at java. util. concurrent. futureTask. run (FutureTask. java: 138) at java. util. concurrent. threadPoolExecutor $ Worker. runTask (ThreadPoolExecutor. java: 886) at java. util. concurrent. threadPoolExecutor $ Worker. run (ThreadPoolExecutor. java: 908) at java. lang. thread. run (Thread. java: 662)
Problem background:
The project is a maven project, and the ContextLoaderListener class is located in the spring-web-3.1.0.RELEASE.jar package. Check the maven pom. xml, and the dependency introduction is normal. In the Maven Dependencies view of the project, you can also see that the spring-web-3.1.0.RELEASE.jar package is introduced normally.
Error cause:
Enter the tomcat deployment path. metadata \. plugins \ org. eclipse. wst. server. core \ tmp0 \ wtpwebapps \ check, found that after the project is deployed in the WEB-INF folder did not generate the lib directory, under normal circumstances, the lib directory is generated and all the dependent jar packages of the project are deployed under this directory.
Solution:
1. Right-click the project and choose Properties.
Select Deployment Assembly, click Add on the right, and select Java Build Path Entries in the pop-up window.
2. Click Next and select Maven Dependencies.
3. Click Finish and you will see that Maven Dependencies has been added to the Web application structure.
After the operation, redeploy the project and no error is reported. Then we will go. metadata \. plugins \ org. eclipse. wst. server. core \ tmp0 \ wtpwebapps \ directory, found that the lib directory is automatically generated under the project WEB-INF directory, and all the dependent jar packages have been deployed. Solve the problem.