Eclipse XML Compilation error referenced file contains errors-spring-beans-4.0.xsd

Source: Internet
Author: User

In eclipse, sometimes in an XML file, especially in a spring-related configuration file, there are compilation errors that do not affect the program's normal operation, such as:

Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-4.0.xsd).

You can resolve this compilation error by following these steps:

1. The spring version is changed, but the Eclipse compiler uses the previously cached spring-beans-**.xsd file. The reason is

For the Eclipse compiler, there is a cache that caches these configuration files, so the validation tells you that the version is not uniform.

The workaround is to empty the files and force eclipse to reload the files.

1) Cache, Network Connections, General, Preferences,
Select the Response file disease Click Delete or click Delete all directly.

2) If it is a MAVEN project, right-click the project and select Maven, select Update Project.

3) If the above two steps are not working, you can close project and reopen force Eclipse to compile.

2. The currently used spring version and configuration file are not the same, resulting in files such as XSD will not be loaded correctly, the current version can be changed.

If unsuccessful, repeat the above 2) 3) two steps.

3. When using spring, multiple configuration files are used, so the configuration of the head must be unified.

If unsuccessful, repeat the above 2) 3) two steps.

Eclipse XML Compilation error referenced file contains errors-spring-beans-4.0.xsd

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.