2013-10-01 73 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