2013-10-01 30 views
0

當我編譯我的項目在Eclipse開普勒在Ubuntu 10.4,我得到這個錯誤信息:月食沒有找到模式

cvc-elt.1: Cannot find the declaration of element 'web-app'. 

的web-app元素看起來是這樣的:

<web-app 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee/ http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" 
    version="3.1" 
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"> 

據我所知,這些URL正在工作,我可以下載web-app_3_1.xdf文件(通過代理使用wget從命令行下載),但編譯失敗。你有什麼想法如何解決它?我檢查了以前的問題和答案,但在Eclipse中我沒有看到關閉緩存的任何選項。此外,在Eclipse中正確配置代理,至少我能夠下載並安裝GWT。

回答

0

嘗試從xsi:schemaLocation的命名空間中刪除尾部斜槓。

變化

xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee/ http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" 

xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" 

,以便將xmlns屬性完全匹配。

+0

沒有幫助,不幸。儘管如此,Windows上的代碼非常相似,所以它可能是環境中的問題(Windows工作站具有更多的公共IP地址)。 – user2414208