Referenced file contains errors (small red Fork error in the first line of XML file) __xml error

Source: Internet
Author: User

When you develop a Web page in eclipse, you often encounter the first line of error when writing an XML file. A small red fork is quoted above the leftmost line.


Click to view the error message:

Referenced file contains errors (Http://www.springframework.org/schema/beans ...) Sort of. What I'm doing here is the spring applicationcontext.xml file, so I'm going to quote a constraint format error for the Spring framework. When I ran the project without a bug, I found that this error did not affect any of the project's functionality, but it was not always easy to report the small Red Cross error on the XML file and project. Try a number of ways, and summarize several solutions below.

First: Click on the Eclipse menu bar in the upper left corner to Project->clean clean up the project you are having problems with. Not only this problem, but also a lot of strange problems can be solved in this way


Second: first, to ensure that Eclipse can get XSD files remotely, to the cache under Window-> Preferences-> General-> Network Connections cache Check the entries box to see if the required file is correct, click "Remove All" if you are unsure, and then right-click the current Project selection validator,eclipse to reload the XSD file;



Third: If the error persists, then you need to delete the XSD file version number, for example:

Http://www.springframework.org/schema/context/spring-context-3.0.xsd

Change into: http://www.springframework.org/schema/context/spring-context.xsd

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.