When eclipse deploys the MAVEN Web project to the Tomcat server, there is no way to copy the jar under Lib to the previous solution

Source: Internet
Author: User

We're doing web development, we're always building Web servers in Eclipse, and deploying Web projects in development to Web servers for debugging, where I'm choosing a tomcat server. Before deploying the Web project to Tomcat for start-up debugging is normal, the sudden failure to start the situation today, the startup process reported the following error:

Java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1714)
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1559)
At Org.apache.catalina.core.DefaultInstanceManager.loadClass (defaultinstancemanager.java:532)
At Org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged (defaultinstancemanager.java:514)
At Org.apache.catalina.core.DefaultInstanceManager.newInstance (defaultinstancemanager.java:133)
At Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4727)
At Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5285)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1559)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1549)
At Java.util.concurrent.futuretask$sync.innerrun (futuretask.java:334)
At Java.util.concurrent.FutureTask.run (futuretask.java:166)
At Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1110)
At Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:603)
At Java.lang.Thread.run (thread.java:722)

Class cannot be found, The class relies on Spring-web-xxxx.jar, looked at the Maven dependency library, the dependency is there, what is going on, and then look at the WebApps in the Tomcat directory deployed projects, the project has been deployed successfully, the corresponding class files and static files have, but carefully look at the web-in F The Lib folder is missing, only to understand why the Org.springframework.web.context.ContextLoaderListener class is not found. Why didn't you copy lib when you started Tomcat in Eclipse, think about the project deployment Setup before you came across it. The solution is as follows:

Right-click on the project->properties-> find deployment Assembly, the right is compiled packaging configuration, see if there is a lack of Lib library dependencies, my is, click Add, add Maven dependency library. The final list is as follows


Restart Tomcat again to start success!!

Reprint Please specify link: http://blog.csdn.net/yiwenjun2008/article/details/18728453

When eclipse deploys the MAVEN Web project to the Tomcat server, there is no way to copy the jar under Lib to the previous solution

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.