Document root element "beans", must match DOCTYPE root "null"分析及解决方法
2009-03-25 10:36
639 查看
解决办法:
1. 在你的工程目录下查找是否含有两个或者多个 spring.jar 包,如:是否有 spring.jar 并且含有 其他
spring-1.3.jar 包。如果同时存在多个,则只留其中一个,因为解析 xml 的时候版本会不兼容。
2. 如果这样还是没有解决的话,检查你的 applicationContext.xml 的 DOCTYPE。
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
......
</beans>
如果是这种解析方式,则将 xml 的 DOCTYPE 换成如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
......
</beans>
解析方式不同,也是造成这个异常的原因之一。
1. 在你的工程目录下查找是否含有两个或者多个 spring.jar 包,如:是否有 spring.jar 并且含有 其他
spring-1.3.jar 包。如果同时存在多个,则只留其中一个,因为解析 xml 的时候版本会不兼容。
2. 如果这样还是没有解决的话,检查你的 applicationContext.xml 的 DOCTYPE。
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
......
</beans>
如果是这种解析方式,则将 xml 的 DOCTYPE 换成如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
......
</beans>
解析方式不同,也是造成这个异常的原因之一。
相关文章推荐
- Document root element "beans", must match DOCTYPE root "null"分析及解决方法
- Document root element "beans", must match DOCTYPE root "null"分析及解决方法
- Document root element "beans", must match DOCTYPE root "null"分析及解决方法
- Document root element "beans", must match DOCTYPE root "null"分析及解决方法
- Document root element "beans", must match DOCTYPE root "null". 解决方法
- Document root element *, must match DOCTYPE root "null"分析及解决方法
- Document root element "beans", must match DOCTYPE root "null". 原因
- Document root element "beans", must match DOCTYPE root "null".
- Document root element "beans", must match DOCTYPE root "null".
- Document root element "beans", must match DOCTYPE root "null 心异常
- spring整合xfire出现Document root element "beans", must match DOCTYPE root "null"错误解决方案
- Document root element "beans", must match DOCTYPE root "null".的错误提示
- Document root element "beans", must match DOCTYPE root "null".
- org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
- SAXParseException: cvc-complex-type.3.2.2&&Document root element "beans", must match DOCTYPE root "null"
- org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
- Document root element "beans", must match DOCTYPE root "null".问题原因
- spring整合xfire出现Document root element "beans", must match DOCTYPE root "null"错误解决方案
- Document root element "beans", must match DOCTYPE root "null"
- maven项目,去除jar包中的不想要的依赖关系(Document root element "beans", must match DOCTYPE root "null". )