Eclipse Xml编译错误Referenced file contains errors - spring-beans-4.0.xsd
本文转自:http://josh-persistence.iteye.com/blog/2125420
在eclipse中,有时候在xml文件中,特别是于Spring相关的配置文件中,会出现一些不影响程序正常运行的编译错误,如:
Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-4.0.xsd).
可通过如下步骤解决这个编译错误:
1. Spring的版本变更了,但是Eclipse的编译器还是使用之前缓存的spring-beans-**.xsd文件。其原因是
对于Eclipse编译器来说有个缓存会缓存这些配置文件,这样验证的时候会告诉你版本不统一。
解决办法是清空这些文件并强制eclipse重新加载这些文件。
1) Preferences -> General -> Network Connections -> Cache
选择响应的文件病点击删除或者直接点击删除全部。
2) 如果是Maven工程,右击工程,并选择Maven,选择Update Project.
3)如果以上两步都不行,则可关闭project并重新打开强制eclipse进行编译。
2. 当前使用的spring版本和配置文件中配置的不相同,导致xsd等文件不会被正确加载,改成当前版本即可。
如果不成功则重复上面的2)3)两步即可。
3. 在使用spring时,使用多个配置文件,那么头里面的配置一定要统一。
如果不成功则重复上面的2)3)两步即可。
Eclipse Xml编译错误Referenced file contains errors - spring-beans-4.0.xsd的更多相关文章
- Referenced file contains errors (http://www.springframework.org/schema...错误
Referenced file contains errors (http://www.springframework.org/schema...错误 Referenced file contains ...
- eclipse配置文件出现小红叉,Referenced file contains errors (xml文件第一行小红叉错误)
原文链接:https://blog.csdn.net/zlj1217/article/details/61432437 ...
- Referenced file contains errors (xml文件第一行小红叉错误)
转自:http://www.manongjc.com/article/30401.html 在eclipse中开发网页时,经常会遇到写xml文件时第一行无缘无故报错.在最左面的行数上面报出一个小红叉, ...
- 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 ...
- Eclipse 中 Spring 项目的 XML 配置文件报错 Referenced file contains errors
原来运行正常的项目,突然在applicationContext.xml 文件头报错 总结一下网上的解决方案: 1.有可能网络状况不好导致 如果使用Maven构建项目,spring在加载xsd文件时总是 ...
- servlet.xml 出现 Referenced file contains errors(http://.......)
问题描述: 打开Eclipse突然发现Web工程的servlet.xml突然报了红叉叉,错误信息如下: Referenced file contains errors (http://www.spri ...
- Referenced file contains errors (http://www.springframework.org/schema...错误--转载
Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-3.0.xsd). ...
- applicationContext.xml 文件头报错Referenced file contains errors
问题如下:原先运行正常的项目,突然在applicationContext.xml 文件头报错 内容:Referenced file contains errors (http://www.spring ...
- eclipse Referenced file contains errors (http://www.springframework.org/schema/context/spring-context-3.0.xsd)
1.情景展示 spring配置文件报错信息如下: Referenced file contains errors (http://www.springframework.org/schema/ ...
随机推荐
- eclipse3.4配置的tomcat server如何部署以前的web项目?
1. 打开.project文件,在<natures>元素中加入 <nature>org.eclipse.wst.common.project.facet.core.nature ...
- springboot 启动类CommandLineRunner(转载)
在Spring boot项目的实际开发中,我们有时需要项目服务启动时加载一些数据或预先完成某些动作.为了解决这样的问题,Spring boot 为我们提供了一个方法:通过实现接口 CommandLin ...
- python——获取数据类型:type()、isinstance()的使用方法:
python——获取数据类型 在python中,可使用type()和isinstance()内置函数获取数据类型 如: (1)type()的使用方法: >>> a = '230' ...
- 数学图形之莫比乌斯带(mobius)
莫比乌斯带,又被译作:莫比斯环,梅比斯環或麦比乌斯带.是一种拓扑学结构,它只有一个面(表面),和一个边界.即它的正反两面在同一个曲面上,左右两个边在同一条曲线上.看它的名字很洋气,听它的特征很玄乎,实 ...
- 第六章 JVM垃圾收集器(2)
上一章记录了几种常见的垃圾收集器,见<第五章 JVM垃圾收集器(1)> 1.G1 说明: 从上图来看,G1与CMS相比,仅在最后的"筛选回收"部分不同(CMS是并发清除 ...
- Android之PowerManager&BatteryManager
PowerManager是Android平台中用于管理控制设备电源状态.重启.休眠状态.唤醒等,使用该API会影响到电池的待机时间,所以无非必要,一般不要使用. 在PowerManager中有几个比较 ...
- [转]How to query posts filtered by custom field values
Description It is often necessary to query the database for a list of posts based on a custom field ...
- 帝吧fb出征是什么原因?帝吧fb出征事情始末 帝吧出征FB打“台独” 台湾网民崩溃:巨人之墙爆了
帝吧出征FB打"台独" 台湾网民崩溃:巨人之墙爆了 发表时间:2016-01-20 21:08:10 字号:A-AA+ 关键字: 帝吧帝吧出征FB帝吧出征FB打台独台独脸书巨人之墙 ...
- android studio中使用adb wifi插件无线调试程序
使用android studio中使用adb wifi插件无线调试程序的前提条件电脑和手机在同一个无线网 1.下载adb wifi插件 File->Settings->Plugins Br ...
- Python面向对象编程 - 一个记事本程序范例(二)
给程序加上控制台菜单 menu.py import sys from notebook import Notebook, Note class Menu: '''Display a menu and ...