Referenced file contains errors (xml文件第一行小红叉错误)
转自:http://www.manongjc.com/article/30401.html
在eclipse中开发网页时,经常会遇到写xml文件时第一行无缘无故报错。在最左面的行数上面报出一个小红叉,
点击查看错误信息:
Referenced file contains errors (http://www.springframework.org/schema/beans…之类的。我这里是做的是spring的applicationContext.xml文件的,所以会报spring框架的约束格式错误。当我没有管这个错误继续运行项目时,发现这个错误并不影响项目的任何功能,但是总会在xml文件上和项目上报小红叉错误,这让人感到很不爽。试过很多种方法,下面总结一下几种解决办法。
第一种:点击eclipse左上角菜单栏 Project->clean 清理一下你所出现问题的项目。不仅这个问题,还有很多奇怪的问题都可以通过这种方式解决
第二种:首先为了确保 Eclipse 可以从远程拿到 xsd 文件,到 Window -> Preferences -> General -> Network Connections -> Cache 下的 Cache entries 框内检查所需要的文件是否正确,如果不确定,就点击 “Remove All”,然后右击当前的 Project 选择 Validator,Eclipse 会重新加载 xsd 文件;
第三种:如果错误依旧,那就需要删掉 xsd 文件的版本号,例如:
http://www.springframework.org/schema/context/spring-context-3.0.xsd
改成: http://www.springframework.org/schema/context/spring-context.xsd
Referenced file contains errors (xml文件第一行小红叉错误)的更多相关文章
- eclipse配置文件出现小红叉,Referenced file contains errors (xml文件第一行小红叉错误)
原文链接:https://blog.csdn.net/zlj1217/article/details/61432437 ...
- springboot项目的maven的pom.xml文件第一行报错 Unknown Error
springboot项目的maven的pom.xml文件第一行报错 Unknown Error https://blog.csdn.net/mini_jike/article/details/9239 ...
- 创建SpringBoot项目pom.xml文件第一行报错:Non-parseable POM E:\maven\repository\org\springframework\securit
在编辑pom.xml时,第一行有个刺眼红色×,然后在Problems看到这个问题 [ERROR] The build could not read 1 project -> [Help 1]E: ...
- 使用eclipse搭建springboot项目pom.xml文件第一行报错(Maven Configuration Problem)
今天在https://start.spring.io/上搭建了一个2.1.5版本的springboot项目,但是把它导入后,pom.xml第一行报错了,查看Problems发现下面的错误 百度后发现方 ...
- STS创建spring boot项目,pom.xml文件第一行报错
亲测能用url地址:https://blog.csdn.net/jrx1995/article/details/100008552
- 【记录】springboot项目的maven的pom.xml文件第一行报错 Unknown Error
原因 : maven的插件版本的问题,造成与IDE的不兼容 解决办法 :在pom中加上 <maven-jar-plugin.version>3.1.1</maven-jar-plug ...
- MyEclipse导入Maven项目pom文件第一行报错,运行Tomcat报Log4j错误--解决方法
问题描述: 前一段时间电脑第一次导入Maven项目,又是pom文件错,改好后又是运行Tomcat报Log4j错误,一直倒腾了近一个月程序才成功跑起来,太不容易. 也上网查了很长时间,没一个方法能解决我 ...
- XML错误信息Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-4.0.xsd). For more information, right click on the message in the Problems View ...
错误信息:Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-4.0.x ...
- servlet.xml 出现 Referenced file contains errors(http://.......)
问题描述: 打开Eclipse突然发现Web工程的servlet.xml突然报了红叉叉,错误信息如下: Referenced file contains errors (http://www.spri ...
随机推荐
- git的commit撤销
写完代码后,我们一般这样 git add . //添加所有文件 git commit -m "本功能全部完成" 执行完commit后,想撤回commit,怎么办? 这样凉拌: gi ...
- Program不是内部命令也不是外部命令
在项目中使用java动态生成.bat文件,再调试时执行bat文件失败! 显示:Program不是内部命令也不是外部命令 百度了一下:C:\"Program Files"或progr ...
- Spring cloud微服务安全实战-7-6自定义metrics监控指标(1)
自己写代码来定义一个metrics,然后让prmetheus收走,在grafana里面定义一个panel并展示出来. prometheus的四种metrics指标.虽然所有的metrics都是数字,但 ...
- Qt开发经验小技巧11-20
获取类的属性 const QMetaObject *metaobject = object->metaObject(); int count = metaobject->propertyC ...
- [c++] Sequence Containers
写在前面 C++ Standard Library For efficiency reasons, STL is not object-oriented: Makes little use of in ...
- JQuery EasyUI更新说明
JQuery EasyUI 1.3.6版本更新内容: Bug(修复) treegrid:修复“getChecked”方法不能正确的返回被选择的行的问题: tree:修复在“onlyLeafCheck” ...
- [LeetCode] 151. Reverse Words in a String 翻转字符串中的单词
Given an input string, reverse the string word by word. For example,Given s = "the sky is blue& ...
- [LeetCode] 409. Longest Palindrome 最长回文
Given a string which consists of lowercase or uppercase letters, find the length of the longest pali ...
- QT -- QString处理
1. 去掉字符串多余的空格,回车等. QString QString::simplified () const Returns a string that has whitespace removed ...
- c++基础(六)——动态内存
在我们的程序中,静态内存——用来保存局部 static 对象,类 static数据成员,以及定义在任何函数之外的变量.栈内存——用来保存定义在函数内的非 static 对象.分配在 静态内存 或 栈 ...