Records-Some problems with Project Java Project Framework (Maven+spring+springmvc+mybatis)

Source: Internet
Author: User

With the completion of the project framework, I thought the launch would be successful, but ....

Project Start report Error 1:java.lang.classnotfoundexception:org.springframework.web.context.contextloaderlistener

This mistake Baidu to say is missing this package, but actually in the project see Maven inside there is this package. So continue Baidu to "may package is found, but not dependent on the project"

Project Right-click-----Project-----Deployment assembly, add, Java Build path entries, Maven Dependencies. Add him in.

"This allows MAVEN's jar packages to be put together on the server at the time of release.": The original text is as follows

The problem is solved. Scenario: Project Right-click, deployment assembly, add, Java Build path entries, Maven Dependencies. This allows the Maven jar package to be placed in the server with the release.

Thanks for sharing, I have also encountered this problem, my side of the situation is: After adding the Spring MVC jar package with Maven, the project is not referenced to these jars, the problem has two places: 1. Project name right-click-MAVEN does not operate update project; 2. Project name right-click Properties-Deployment Assembly, the right box does not operate as follows:    Add, Java Build Path Entries, Next, select M Aven Dependencies, after the above operation is still a little problem, although the spring jar is referenced in the project, but the code can not reference the class library, so the operation is as follows: 1. Project name right-click Maven-Disable maven Nature; 2. The project name is right-click Configure, Convert to Maven project; 3. Finally, you need to check again the top describes the two problems where there is a recurrence, if so, repeat the steps;

  

Records-Some problems with Project Java Project Framework (Maven+spring+springmvc+mybatis)

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.