配置Dubbo 项目遇到的坑---无法读取方案文档 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd'


Multiple annotations found at this line: 
    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element ‘dubbo:application’. 
    - schema_reference.4: Failed to read schema document ‘http://code.alibabatech.com/schema/dubbo/dubbo.xsd‘, because 1) could not find the 
     document; 2) the document could not be read; 3) the root element of the document is not . 

根据错误提示发现从http://code.alibabatech.com/schema/dubbo/dubbo.xsd地址下无法下载dubbo.xsd文档,需要手动配置一下“
        1. 去网上提前下载好dubbo.xsd文档,保存到本地路径下。
         2. 在eclipse中选择在windows->preferrence->xml->xmlcatalog->add->catalog entry  ->file system
         3.选择下载好的dubbo.xsd文档
         4.修改Key值,要和配置文件中的”http://code.alibabatech.com/schema/dubbo/dubbo.xsd“地址一样。
         5.在xml文件右键validate就可以解决了。

 

如果继续报错:考虑是否版本问题

我一开始pom.xml 中配置

 <!-- dubbo相关 -->

   <dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>dubbo</artifactId>
    <version>2.5.3</version>
   </dependency>

按照上述办法依然报错

改成

<!-- dubbo相关 -->
   <dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>dubbo</artifactId>
    <version>2.6.0</version>
   </dependency>

就不报错了

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM