微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Dubbo :无法加载dubbo.xsd

 

异常信息

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element

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 <xsd:schema>.

异常.png

错误原因:

http://code.alibabatech.com/schema/dubbo/dubbo.xsd此页面已无法下载

解决办法:

  • dubbo-2.6.1.jar解压, 进入META-INF文件夹

    dubbo-2.6.1.png

     

  • 在eclipse中Window->Preferences->XML->XML Catalog,选中User Specified Entries,点击Add...

     

    XML.png

  • 点击File System...选择刚刚解压出来的dubbo.xsd文件

     

    Add XML Catalog Element.png

     

    Add XML Catalog Element-New.png

  • 将图中的Key:的内容修改为http://code.alibabatech.com/schema/dubbo/dubbo.xsd, 点击确定。

    修改后的内容.png

     

  • 在对应的xml文件中右键,选择Validate即可。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐