dubbo实战---lineNumber: 13;columnNumber: 82; cvc-elt.1: Cannot find the declaration of element 'beans'
2017-12-11 20:20
549 查看
将dubbo服务发布的时候,报了如下错误:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:Line 13 in XML document from URL[jar:file:/ServiceJars/dub-service-demo.jar!/META-INF/spring/dubbo-demo-provider.xml]is
invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 13;columnNumber: 82; cvc-elt.1: Cannot find the declaration of element 'beans'
错误原因:
因为服务器没有连接到外网,当不下来需要的jar包.
解决方法:
将dubbo的provider的配置文件的头文件中的路径改为classpath:的形式
之前的头文件:
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" xmlns="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">[/code]
修改后的头文件:<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" xmlns="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/beans classpath:/org/springframework/beans/factory/xml/spring-beans-2.0.xsd http://code.alibabatech.com/schema/dubbo classpath:/META-INF/dubbo.xsd">
这样发布后就不会报错了..
相关文章推荐
- Spring 配置文件报错: cvc-elt.1: Cannot find the declaration of element ""beans""
- cvc-elt.1: Cannot find the declaration of element 'beans'.
- maven项目报错:cvc-elt.1: Cannot find the declaration of element 'beans'.
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'(转)
- org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
- Spring 2.0.8 和 2.5 applicationContext.xml 头文件写法 Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- 配置spring文件时项目启动不了--cvc-elt.1: Cannot find the declaration of element 'beans'.
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- spring项目启动报错 cvc-elt.1: Cannot find the declaration of element 'beans'.
- springmvc+Maven Type cvc-elt.1: Cannot find the declaration of element "beans"
- cvc-elt.1: Cannot find the declaration of element 'beans'.
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
- nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'(转)
- cvc-elt.1: Cannot find the declaration of element 'beans'
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- cvc-elt.1: Cannot find the declaration of element 'ehcache'.