Referenced file contains errors (jar:file:/.../plugins/org.jboss.tools.jst.web_3.5.0.Final-v20130717-0309-B75.jar!/catalog/web-facesconfig_2_2.xsd)
Asked Answered
S

5

12

I make in JSF Project in eclipse and The file faces-config.xml give an error

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

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>

when I remove the following line, error indication vanish in faces-config.xml

http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd

Update me how to resolve this issue ?

Shanonshanta answered 17/9, 2013 at 6:13 Comment(10)
Is your jars JSF version 2.2. ?Goldeneye
@Goldeneye yes! version="2.2" showing above in faces-config.xmlShanonshanta
i am asking for jar versions.Goldeneye
@Goldeneye yes! JSF 2.2 (Mojarra 2.2.0)\mojarra-2.2.0-FCS\lib\javax.faces.jarShanonshanta
Try the current development release of JBoss Tools: download.jboss.org/jbosstools/updates/development/keplerOrchid
I am using Kepler @OrchidShanonshanta
I know. Have you tried the current development release of JBoss Tools as asked in previous comment?Orchid
Base on your recommendation I refer your previous comment but Referenced file contains errors (jar:file:/D:/eclips/eclipse k/plugins/org.jboss.tools.jst.web_3.5.1.Alpha1-v20130906-1546-B80.jar!/catalog/web-facesconfig_2_2.xsd) again error ! :( @OrchidShanonshanta
Well, report it to JBoss Tools guys: issues.jboss.org/browse/JBIDE In the meanwhile, just ignore the error. The code should work and run just fine.Orchid
OK! To remove error I put semi colon (;) between two location (xsi:schemaLocation) such as xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee; http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd" now there is no any error ! @OrchidShanonshanta
M
11

You specified http://xmlns.jcp.org/xml/ns/javaee twice, so remove one.

Minyan answered 28/9, 2013 at 15:21 Comment(1)
The faces-config.xml of JSF 2.2 is created with a duplicated namespace. So the above answer is actually correct. Remove the first occurrence of 'xmlns.jcp.org/xml/ns/javaee' and the problem should be solved.Reprobative
R
5

Disabling caching of XSD files fixed the issues for me - with Eclipse Neon, the relevant option is at Window->Preferences->General->Network Connections->Cache->Disable Caching. Check that box, then clean and build. I think in my case what happened is I tried to rebuild while on a wifi with no internet connection, Eclipse tried to validate those files and couldn't, and decided to show this type of error.

Recognizance answered 8/5, 2017 at 18:22 Comment(1)
I didn't have to disable caching, but clearing out the current Cached entries resolved the issue.Commutable
V
2

For me, removing the duplicate namespace had an unpleasant side effect of disabling content assist when editing faces-config.xml.

These headers with "duplicate" namespaces are specified everywhere like that, the faces-config one in particular is mentioned in the JSF specification. Even the W3C XML Schema specification features a similar example.

So it seems that the header in question is correct. Installing the latest updates for Eclipse and JBoss tools solved this problem for me.

It may be related to these JBoss Tools issues: JBIDE-14439, JBIDE-15605.

Volvulus answered 18/2, 2014 at 13:32 Comment(0)
A
1

You have two options(i only found these.. haha):

1 - You specified http://xmlns.jcp.org/xml/ns/javaee twice, so remove one.(by Shukti)

2- If you're getting some erros like "cvc-complex-type..." just put <from-view-id>something here </from-view-id> in navigation-rules for each line with error. (the error will disapear, but, i can't ensure it will work for you).

Anglican answered 26/7, 2016 at 17:32 Comment(0)
H
0

I faced same issue in weblogic.xml file, so I removed space in <wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.9/weblogic-web-app.xsd"> and then clean build. It is working fine for me.

Honghonied answered 20/5, 2020 at 7:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.