Eclipse Language Servers: There is ‘1’ error in ‘javaee_7.xsd’

This is a bug in Eclipse which manifested since 2021-03.

It’s broken down here: https://github.com/eclipse/lemminx/issues/1042#issuecomment-859778034:

Ok I can reproduce the issue with a fresh Eclipse IDE (the last). I can explain the problem but I don’t know how to fix it (for the moment).

When you have "There is '1' error in 'jakartaee_9.xsd'" error, you must open the XSD file (from the cache) and you should see 1 error and 1 warning:

image

There is a warning:

schema_reference.4: Failed to read schema document 'platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/xml.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>.  jakartaee_9.xsd /lemminx-cache/https/jakarta.ee/xml/ns/jakartaee    line 52 Language Servers

image

which try to define xml:lang attribute inside xml.xsd file. But here the xml.xsd cannot be retrieved (the warning message) and you have the error:

image

It tries to download the XSD from platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/xml.xsd but platform is specific to Eclipse IDE. In other words when http://www.w3.org/2001/xml.xsd must be resolved, it says that platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/xml.xsd is the location of XSD. I don’t know who do that?

I have the impression than LemMinx is configured to use XML catalog from WTP:

image

While waiting for the Eclipse version with the fix (which is indeed not yet released at the time of writing), one work around is disable the LemMinx validation:

@chris21k please note that you can disable LemMinx validation:

image

Leave a Comment