zoukankan      html  css  js  c++  java
  • Referenced file contains errors (http://www.springframework.org/schema/context/spring-context.xsd). For more information, right click on the message in the Problems View and select "Show Details..."

    问题如下:原先运行正常的项目,突然在applicationContext.xml 文件头报错

    Referenced file contains errors (http://www.springframework.org/schema/context/spring-context.xsd). For more information, right click on the message in the Problems View and select   "Show Details..."

    原因分析:如果使用Maven构建项目,spring在加载xsd文件时总是先试图在本地查找xsd文件(spring的jar包中已经包含了所有版本的xsd文件),如果没有找到,才会转向去URL指定的路径下载。所以出现该情况一般是因为断网或spring的官网暂时无法连接导致的。 可以通过在浏览器输入xsd文件的URL,如:spring-beans的话,输入http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 进行确认。

    这次项目我是使用Maven。

    解决办法:1. 首先为了确保 Eclipse 可以从远程拿到 xsd 文件,到 Window -> Preferences -> General -> Network Connections -> Cache 下的 Cache entries 框内检查所需要的文件是否正确,如果不确定,就点击 "Remove All",然后右击当前的 Project 选择 Validator,Eclipse 会重新加载 xsd 文件;

    2.最简捷的方法是删掉 xsd 文件的版本号(我的项目所有的都已经删除了,但仍报错,故采取method 1)。

  • 相关阅读:
    Spring国际化模块
    广告牌 循环 轮播 图片
    ImageLoader 网络加载图片
    ProgressBar 进度条 旋转
    UI处理 线程
    权限 动态 访问
    系统 状态栏 导航栏
    对话框 dialog 整理
    修改 字体
    获取 Activity中所有的View ViewGroup
  • 原文地址:https://www.cnblogs.com/crazy-yyl/p/7153722.html
Copyright © 2011-2022 走看看