引用文件包含错误(jar:file:/.../ plugins/org.jboss.tools.jst.web_3.5.0.Final-v20130717-0309-B75.jar!/catalog/web-facesconfig_2_2.xsd)

Sha*_*oor 11 xml jsf jboss-tools faces-config jsf-2

我在eclipse中使用JSF Project制作文件faces-config.xml会出错

Referenced file contains errors (jar:file:/D:/eclips/eclipse k/plugins/org.jboss.tools.jst.web_3.5.0.Final-v20130717-0309-B75.jar!/catalog/web-facesconfig_2_2.xsd). 
Run Code Online (Sandbox Code Playgroud)

faces-config.xml中

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
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-facesconfig_2_2.xsd"
version="2.2">

</faces-config>
Run Code Online (Sandbox Code Playgroud)

当我删除以下行时,faces-config.xml中的错误指示消失

http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd
Run Code Online (Sandbox Code Playgroud)

更新我如何解决此问题?

小智 9

你指定了http://xmlns.jcp.org/xml/ns/javaee两次,所以删除一个.


Mat*_*inn 5

禁用 XSD 文件缓存解决了我的问题 - 使用 Eclipse Neon,相关选项位于窗口->首选项->常规->网络连接->缓存->禁用缓存。选中那个框,然后清理并构建。我想在我的情况下发生的事情是我试图在没有互联网连接的 wifi 上重建,Eclipse 试图验证这些文件但不能,并决定显示这种类型的错误。