eclipse中xml文件报错异常处理
来源:互联网 发布:mac pdf preview 编辑:程序博客网 时间:2024/06/01 20:29
最近一个java web工程中常出现xml文件的xsd验证失败信息,异常如下:
Multiple annotations found at this line: - Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..." - Referenced file contains errors (http://www.springframework.org/schema/tool/spring-tool-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..." - Referenced file contains errors (http://www.springframework.org/schema/context/spring-context-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..."
展开异常信息:
The errors below were detected when validating the file "spring-beans-3.0.xsd" via the file "applicationContext-mongodb.xml". In most cases these errors can be detected by validating "spring-beans-3.0.xsd" directly. However it is possible that errors will only occur when spring-beans-3.0.xsd is validated in the context of applicationContext-mongodb.xml.
解决办法就是将配置文件中的xsd文件的版本号去掉。
原文档:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mongo="http://www.springframework.org/schema/data/mongo" xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
修改为:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mongo="http://www.springframework.org/schema/data/mongo" xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
就是将spring-context的xsd文件的版本号去了就可以了。
参考:http://stackoverflow.com/questions/13693065/error-in-spring-application-context-schema
0 0
- eclipse中xml文件报错异常处理
- eclipse中xml文件报错异常处理
- eclipse中读取xml文件报错
- eclipse 中忽略jsp, xml文件中的报错信息
- eclipse 中忽略jsp, xml文件中的报错信息
- eclipse中引入jquery文件报错的处理方法
- 学习笔记之eclipse中处理js文件报错
- Eclipse 中XML文件处理插件Rinzo
- eclipse屏蔽xml文件报错
- eclipse中javascript报错问题处理
- eclipse中javascript报错问题处理:
- XML文件中Eclipse报错Unexpected namespace prefix "null" found for tag
- XML文件中大于小于报错
- maven 中 pom.xml 文件报错
- eclipse中js文件报错问题解决
- eclipse中.svg文件报错
- eclipse中js文件报错解决方法
- web.xml中<async-supported>报错异常
- static code analysis
- 2016年06月08日学习日记c语言指针
- ubuntu下比较好用的软件以及安装方法
- xcode换新版本,原来工程编译报错:linker command failed with exit code 1(use -v to see invocation)
- 沃通CA受邀在2016欧洲电子签名论坛(EFPE)发表演讲
- eclipse中xml文件报错异常处理
- int型的MeasureSpec来表示一个组件的大小
- Easyui-combobox使用
- 接口和抽象类
- layoutSubviews总结
- Real-time Expression Transfer for Facial Reenactment
- 幸好你来得早啊!
- 2016年06月12日学习日记c语言指针
- 7个改变世界的Java项目