SPRING10 Common anomaly resolution method

Source: Internet
Author: User

One, the exception for the configuration file could not be found

Explanation: This means that, without looking for the configuration file for the controller's XML, modify the configuration file name.

Second, the namespace configured in XML does not find the corresponding schema exception

Xmlns:util= "Http://www.springframework.org/schema/util" is removed because util naming is not present in the schema

Third, can not find the exception of Jackson.jar

Missing Jackson's jar package, import Jackson-all-1.9.5.jar

Iv. Bean is not the only exception

The exception is that after a class has configured multiple beans, we are still using Ctx.getbean (Person.class), which is to get the Bean object based on the bean's class map. The Bean object returned at this time is not unique and has multiple bean objects. The workaround is to get the Bean object based on the bean's ID.

V. Missing log jar Package

The problem is that the project lacks spring-dependent jar package files. Solution: Join Commons-logging-1.1.3.jar.

Six. Bean exception not found

The problem is that a bean with name Filter2 is not found in the project. To be blunt is to find the bean with ID filter2 in Applicationcontext.xml, configure it.

Vii. Lack of Spring-webmvc-4.0.6.release.jar package

Solution: Add Spring's MVC rack package to your project. If my spring version is 4.0.6, then add the Spring-webmvc-4.0.6.release.jar in.

Viii. lack of Spring-aop-4.0.6.release.jar package

Solution: Add Spring's AOP rack package to your project. If my spring version is 4.0.6, then add the Spring-aop-4.0.6.release.jar in.

Ix. lack of Spring-expression-4.0.6.release.jar package

Solution: Add spring's expression rack package to your project. If my spring version is 4.0.6, then add the Spring-expression-4.0.6.release.jar in.

Ten,the name of the bean, name or ID, or alias aliases already exist

Workaround: Change the name of the duplicate to a name.

Xi. The bean's automatic loading could not find the corresponding bean problem

Workaround: Add default-autowire= "ByName" default-lazy-init= "true" to the <beans> root node in the configuration file or <context:component-scan Base-package= "com.xxx.dao.*" ></context:component-scan> package below with * match

SPRING10 Common anomaly resolution method

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.