原文链接:https://blog.csdn.net/zlj1217/article/details/61432437
             
           
                   
                                                   
                                       
               
                                           
在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

eclipse配置文件出现小红叉,Referenced file contains errors (xml文件第一行小红叉错误)的更多相关文章

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

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

  2. 使用eclipse搭建springboot项目pom.xml文件第一行报错(Maven Configuration Problem)

    今天在https://start.spring.io/上搭建了一个2.1.5版本的springboot项目,但是把它导入后,pom.xml第一行报错了,查看Problems发现下面的错误 百度后发现方 ...

  3. Eclipse Xml编译错误Referenced file contains errors - spring-beans-4.0.xsd

    本文转自:http://josh-persistence.iteye.com/blog/2125420 在eclipse中,有时候在xml文件中,特别是于Spring相关的配置文件中,会出现一些不影响 ...

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

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

    问题: java项目在Eclipse中xml有小红叉 Problems:Referenced file contains errors (http://www.springframework.org/ ...

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

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

  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. servlet.xml 出现 Referenced file contains errors(http://.......)

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

  9. Referenced file contains errors

    Referenced file contains errors (file:/D:/TONG/tong/eclipse/config_/xsd/spring-context-4.2.xsd). For ...

随机推荐

  1. 10-SpringMVC04

    FreeMarker 1.入门案例 1. 导包:freemarker.jar 2. 需要创建模板文件的路径:src/main/resources/template 3. 创建一个模板对象:hello. ...

  2. javascript检测客户端环境是否是pc端

    //isPC(): 检测客户端环境是否是pc端 function isPC(){ let userAgent = navigator.userAgent; let agents = ["An ...

  3. 常用命令 find chmod

    find   path   -option   [   -print ]   [ -exec   -ok   command ]   {} \; find  [指定查找目录]  [查找规则]  [查找 ...

  4. 1138 - Trailing Zeroes (III) 二分

    1138 - Trailing Zeroes (III)   You task is to find minimal natural number N, so that N! contains exa ...

  5. 让div充满整个body

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. 标准 I/O 和管道

    1.标准输入和输出1>程序:指令+数据(指令服务于数据) 读入数据:input 输出数据:output 2>三种 I/O 设备 Linux 给程序提供三种 I/O 设备 标准输入(STDI ...

  7. 用原生JS&PHP简单的AJAX实例

    功能介绍: 1)file.html 使用 xmlhttp 请求服务器端文件 text ,并更新 file.html 的部分内容 2)update.html 使用 xmlhttp 通过 filewrit ...

  8. jq模糊匹配(qq:2798641729)

    图灵学院--Java高级架构师-互联网企业级实战VIP课程(价值6380)(qq:1324981084) jq是一般程序员在前台开发的时候都会使用的技术,其中模糊匹配查询在动态添加标签的时候经常用到, ...

  9. [MySQL]ANALYZE TABLE 更新索引基数

    MySQL使用存储的键分布基数来确定表连接顺序在决定对查询中的特定表使用哪些索引时,也会使用使用键分布基数 ANALYZE TABLE 表名 可以更新表的索引基数,使其更接近非重复的记录数,记录数可以 ...

  10. 2020数据字典php-直接复制

    [2020数据字典php-直接复制] <?php /** * 生成mysql数据字典 */ header ( "Content-type: text/html; charset=utf ...