Maven ClassNotFoundException:org.springframework.web.context.ContextLoader

Source: Internet
Author: User

Info: Starting Servlet engine:apache tomcat/6.0.322012-3-31 9:39:40 org.apache.catalina.core.StandardContext Listenerstart 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:1680) at Org.apache.catalina.loader.WebappClassLoader.loadClass (Webappclassloader.java : 1526) at Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4148) at Org.apache.catalina.core.StandardContext.start (standardcontext.java:4704) at Org.apache.catalina.core.ContainerBase.start (containerbase.java:1053) at Org.apache.catalina.core.StandardHost.start (standardhost.java:840) at Org.apache.catalina.core.ContainerBase.start (containerbase.java:1053) at Org.apache.catalina.core.StandardEngine.start (standardengine.java:463) at Org.apache.catalina.core.StandardService.start (Standardservice.java:525) at Org.apache.catalina.core.StandardServer.start (standardserver.java:754) at Org.apache.catalina.startup.Catalina.start (catalina.java:595) at Sun.reflect.NativeMethodAccessorImpl.invoke0 ( Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (DELEGATINGMETHODACCESSORIMPL.JAVA:25) at Java.lang.reflect.Method.invoke (method.java:597) at Org.apache.catalina.startup.Bootstrap.start (Bootstrap.java : 289) at Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:414) 2012-3-31 9:39:40 Org.apache.catalina.core.StandardContext Listenerstart Critical: Skipped installing application listeners due to previous Error (s) 2012-3-31 9:39:40 org.apache.catalina.core.StandardContext start critical: Error Listenerstart

This problem occurs because the class file is not found
is the MAVEN project
If you make sure that this org.springframework.web.context.ContextLoaderListener is already there, the problem is that Tomcat did not use the Web entry for the purpose of publishing the
Maven's dependency packages are packaged together as the project is compiled
Workaround:
    1. Click on the Project-"Properties"
    2. Select Deployment Assembly, click the Add button on the right, and select Java Build Path in the popup window Entries
    3. Click Next to select Maven Dependencies (or select all dependent packages specified in the Pom.xml file)
    4. Click Finish and you can see that maven dependencies has been added to the Web application structure
    5. Restart Tomcat, test

Maven ClassNotFoundException:org.springframework.web.context.ContextLoader

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.