异常信息
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即可。