本文转自: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. Jquery焦点图/幻灯片效果 插件 KinSlideshow

    JavaScript $(function(){         $("#KinSlideshow").KinSlideshow({                 moveSty ...

  2. OpenShift 项目的备份和恢复实验

    本测试记录从openshift 3.6环境中导出项目,然后在将项目环境恢复到Openshift 3.11中所需要的步骤 从而指导导入导出的升级过程. 1.安装Openshift 3.6版本 过程略 2 ...

  3. 【BestCoder】【Round#44】

    模拟+Trie+桶排(归并?)+容斥 A 模(shou)拟(su)题= =感觉好像见过? 计算得分什么的…… //BestCoder #44 A #include<vector> #inc ...

  4. C语言:通过函数指针来完成两个数的加减乘除(函数指针当做参数使用)

    // //  main.c //  Function_pointer // //  Created by mac on 15/8/2. //  Copyright (c) 2015年. All rig ...

  5. Objective-C:在类中设置不同协议

    在下面的代码中,设置了两种不同的协议规则:一种是老师对学生设置的协议:即老师发出命令后,学生站起来.回答问题.坐下; 另一种是我对学生设置的协议:即学生按照我的协议中的初始化函数去初始化一个整数. / ...

  6. 我所遭遇过的游戏中间件---HumanIK

    我所遭遇过的游戏中间件---HumanIK Autodesk HumanIK游戏中间件,为游戏创建更加可信.真实的角色动画.该中间件的全身逆向运动(FBIK)系统支持角色真实地与所在环境及其它角色进行 ...

  7. Retrofit 从入门到了解【总结】

    源码:https://github.com/baiqiantao/RetrofitDemo.git 参考:http://www.jianshu.com/p/308f3c54abdd Retrofit入 ...

  8. RecyclerView 判断滑到底部 顶部 预加载 更多 分页 MD

    Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...

  9. Jenkins——应用篇——插件使用——Publish over SSH

    本文是jenkins应用系统文章的一部分,大部分来自工作和学习中的实践,部分内容来自官方文档和网友的文章,引用的文章会在"參考资料"部分附上原始链接,如无意中侵犯您的权利.请联系Q ...

  10. 5. How to set up a Activity

    1. Create a new xml in "layout" folder "splah.xml" <?xml version="1.0&qu ...