本文转自: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的更多相关文章

  1. Referenced file contains errors (http://www.springframework.org/schema...错误

    Referenced file contains errors (http://www.springframework.org/schema...错误 Referenced file contains ...

  2. eclipse配置文件出现小红叉,Referenced file contains errors (xml文件第一行小红叉错误)

    原文链接:https://blog.csdn.net/zlj1217/article/details/61432437                                          ...

  3. Referenced file contains errors (xml文件第一行小红叉错误)

    转自:http://www.manongjc.com/article/30401.html 在eclipse中开发网页时,经常会遇到写xml文件时第一行无缘无故报错.在最左面的行数上面报出一个小红叉, ...

  4. 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 ...

  5. Eclipse 中 Spring 项目的 XML 配置文件报错 Referenced file contains errors

    原来运行正常的项目,突然在applicationContext.xml 文件头报错 总结一下网上的解决方案: 1.有可能网络状况不好导致 如果使用Maven构建项目,spring在加载xsd文件时总是 ...

  6. servlet.xml 出现 Referenced file contains errors(http://.......)

    问题描述: 打开Eclipse突然发现Web工程的servlet.xml突然报了红叉叉,错误信息如下: Referenced file contains errors (http://www.spri ...

  7. Referenced file contains errors (http://www.springframework.org/schema...错误--转载

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

  8. applicationContext.xml 文件头报错Referenced file contains errors

    问题如下:原先运行正常的项目,突然在applicationContext.xml 文件头报错 内容:Referenced file contains errors (http://www.spring ...

  9. 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/ ...

随机推荐

  1. Python kmean

    # -*- coding: utf-8 -*-from sklearn.cluster import KMeansfrom sklearn.externals import joblibimport ...

  2. mac下使用brew安装java等应用

    可以使用brew安装很多应用,比如java,idea,iterms,sublime brew tap caskroom/versions 将会安装新的brew仓库源brew cask install ...

  3. 通过java读取HDFS的数据 (转)

    原文链接:通过java读取HDFS的数据 通过JAVA直接读取HDFS中的时候,一定会用到FSDataInputStream类,通过FSDataInputStream以流的形式从HDFS读数据代码如下 ...

  4. opencv学习_5 (IplImage的结构)

    IplImage结构体为: typedef struct _IplImage { int nSize; /* IplImage大小 */ int ID; /* 版本 (=0)*/ int nChann ...

  5. HashTable HashMap HashSet区别(java)

    Hashtable: 1. key和value都不许有null值 2. 使用enumeration遍历 3. 同步的,每次只有一个线程能够访问 4. 在java中Hashtable是H大写,t小写,而 ...

  6. JNI 详细使用 基础【步骤】

    1.定义本地[native]方法.通常情况下,应单独定义一个类来封装所有native方法.native方法相当于一个[接口]中的方法,只有方法声明,没有方法体. 2.在项目根目录下创建[jni文件夹] ...

  7. scala 学习笔记十 一 伴生对象

    1.介绍 a.所谓伴生对象就是和某个class同名的object, 并且object 必须和class在同一个scala源文件中. b.在scala中,没有像java中的静态类,静态方法和静态成员等, ...

  8. python 分词计算文档TF-IDF值并排序

    文章来自于我的个人博客:python 分词计算文档TF-IDF值并排序 该程序实现的功能是:首先读取一些文档,然后通过jieba来分词,将分词存入文件,然后通过sklearn计算每一个分词文档中的tf ...

  9. HP Onboard Administrator 固件升级

    HP Onboard Administrator是HP公司服务器的远程管理平台.更新是一个非常简单的过程,可以完全通过办公自动化web管理界面. 1. 下载所需二进制文件 下载地址:HP BladeS ...

  10. angularJs的一次性数据绑定:双冒号::

    angularJs 中双冒号 ::来实现一次性数据绑定. 原文: https://blog.csdn.net/qianxing111/article/details/79971544 -------- ...