错误描述
dubbo项目xml文件报错,不支持dubbo元素,需要在本地安装dubbo.xsd文件。
错误信息如下:
Multiple markers at this line
- 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>.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'.
dubbo.xsd文件下载地址 :http://download.csdn.net/detail/u012385190/9650493
解决步骤
1、eclipse ->window->perferences>xml catalog->add(本地要先下载dubbo.xsd文件) ,注意KEY 需要以/dubbo.xsd结尾。
线上dubbo.xsd路径:http://code.alibabatech.com/schema/dubbo/dubbo.xsd
2、在报错的xml文件右键鼠标validate。
如上图所示,报错信息消失。