Java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener Problem Solving

Source: Internet
Author: User

The following error occurred when building the SSH project today:

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListenerjava.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

Check it online. Some people say there is no spring-related package. But I'm checking that the package does have a dependency.

Double-clicking the "Org.springframework.web.context.ContextLoaderListener" of web. XML also jumps to the corresponding class file. Clearly not the reason for the lack of packages.

The back also took a long time and did not solve, accidentally in a blog comment found the solution. Let's say that the apes are also using Maven as a way to try the following solutions:

In fact, your jar file may not be published in the Lib folder of your project (assuming you're building it with maven). You can try the following items right click on Properties Select Deployment Assembly Then click on the AddButton on the right to select Java Build Path entries and then click Nextbutton and select your Maven Dependencies OK.

Java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener Problem Solving

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.