After update maven under MAVEN project Eclipse error: Java.lang.ClassNotFoundException:ContextLoaderL

Source: Internet
Author: User

After update maven under MAVEN project Eclipse error: Java.lang.ClassNotFoundException:ContextLoaderL
Severity: Error Configuring 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 (defaultinstancemanager.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)  

Issue Background :

Project for MAVEN Engineering, the Contextloaderlistener class is located in the Spring-web-3.1.0.release.jar package. The pom.xml of Maven was checked, and the dependency was introduced properly. In the project Maven dependencies view, it is also possible to see that the Spring-web-3.1.0.release.jar package is introduced in the normal.

Cause of Error:

Enter the deployment path to Tomcat. Metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ under the check, After the discovery of the project deployment, the Lib directory is not generated under the Web-inf folder, and normally a Lib directory is generated and all dependent jar packages of the project are deployed to that directory.

Solution:

1. Right click on the project-select Properties

Select Deployment Assembly, click the Add button on the right, and select Java Build Path in the pop-up window Entries

2. Click Next to select Maven Dependencies

3. Click Finish, and you can see that maven dependencies has been added to the Web application structure.

After the operation, redeploy the project, no longer error. Then we go to the. Metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ directory, found in the project Web-inf directory automatically generated Lib directory, And all the dependent jar packages have been deployed. The problem is therefore resolved.

Transferred from: http://blog.sina.com.cn/s/blog_7fb5109d0101o48g.html

After update maven under MAVEN project Eclipse error: Java.lang.ClassNotFoundException:ContextLoaderL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.