The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'

在eclipse中导入了一个新的maven工程,然后发现有xml报错,具体报错内容如下:

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>

然后就直接百度了下,发现很多人都遇见了相同的问题,解决方法也简单:

1.下载一个dubbo.xsd文件,可以在APACHE官网下整个dubbo文件,然后解压出dubbo.xsd文件,下载地址:

  https://www.apache.org/dyn/closer.cgi?path=incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-source-release.zip

 (当然也可以只下载dubbo.xsd文件,我已同步上传该文件到****,审核通过即可用);

2.在windows->preferrence->xml->xmlcatalogadd->catalog entry  ->file system 选择刚刚下载的文件路径

3.修改key值和配置文件的http://code.alibabatech.com/schema/dubbo/dubbo.xsd 相同保存

(!注意:导入dubbo.xsd文件后,key值会自动生成,生成的key是没有最后dubbo.xsd部分的,需要手动添加。不添加的话,错误还是会存在,而且会让你有些怀疑人生的,觉得自己的错误和网上不相同。)

4.在xml文件右键validate就可以解决了

The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'