1. 程式人生 > >解決:dubbo找不到dubbo.xsd報錯

解決:dubbo找不到dubbo.xsd報錯

構建dubbo專案的時候會遇到:

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>.

一.解決方法

開啟dubbo-2.5.3.jar包 找到META-INF下面的dubbo.xsd

把dubbo.xsd儲存到本地,我的是H:\dubbo.xsd

window  -  preferences -xml   -xml  catalog 

選擇add,如下設定

注意的是:你手動加上以後,key的路徑是不完整的,沒有指定檔名稱,需要在原地址上加上/dubbo.xsd,好多人都沒加,導致報錯去不掉,然後update project就行了,或者重新貼上複製一下你報錯的xml的內容。