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’.
公司的项目,本机启动报错:
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>.
原因:由于网络环境或者其他未知的问题,Eclipse识别<dubbo:application>标签出错。
解决:搞一个dubbo.xsd文件来,网上找或者从dubbo.jar中找,在Eclipse中手动添加。
windows->preferrence->xml->xmlcatalog add->catalog entry ->file system 选择刚刚保存的文件路径,修改key值和配置文件
http://code.alibabatech.com/schema/dubbo/dubbo.xsd 相同保存,在xml文件右键validate。
不知道是不是IDE的问题,在使用Eclipse的时候经常会遇见这个问题,IDEA中却很少见到。