异常信息
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>.
错误原因:
http://code.alibabatech.com/schema/dubbo/dubbo.xsd
此页面已无法下载
解决办法:
-
将
dubbo-2.6.1.jar
解压, 进入META-INF文件夹 -
在eclipse中Window->Preferences->XML->XML Catalog,选中User Specified Entries,点击Add...
-
点击File System...选择刚刚解压出来的dubbo.xsd文件
-
将图中的Key:的内容修改为
http://code.alibabatech.com/schema/dubbo/dubbo.xsd
, 点击确定。 在对应的xml文件中右键,选择Validate即可。