You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPEcatalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "https://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd" >
<catalogxmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<!-- W3C schema -->
<uriname="urn:speedata.de:2009/publisher/en"uri="layoutschema-en.xsd"/>
</catalog>
The document link doesn't work for the uri attribute and you can see the error message:
[Error - 18:33:14] Request textDocument/documentLink failed.
Message: Internal error.
Code: -32603
java.util.concurrent.CompletionException: java.lang.ClassCastException: class org.eclipse.lemminx.dom.DOMDocumentType cannot be cast to class org.eclipse.lemminx.dom.DOMElement (org.eclipse.lemminx.dom.DOMDocumentType and org.eclipse.lemminx.dom.DOMElement are in unnamed module of loader 'app')
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1238)
at java.base/java.util.concurrent.CompletableFuture$BiApply.tryFire(CompletableFuture.java:1205)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:479)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: java.lang.ClassCastException: class org.eclipse.lemminx.dom.DOMDocumentType cannot be cast to class org.eclipse.lemminx.dom.DOMElement (org.eclipse.lemminx.dom.DOMDocumentType and org.eclipse.lemminx.dom.DOMElement are in unnamed module of loader 'app')
at org.eclipse.lemminx.extensions.catalog.CatalogUtils.getCatalogEntries(CatalogUtils.java:67)
at org.eclipse.lemminx.extensions.catalog.XMLCatalogDocumentLinkParticipant.findDocumentLinks(XMLCatalogDocumentLinkParticipant.java:36)
at org.eclipse.lemminx.services.XMLDocumentLink.findDocumentLinks(XMLDocumentLink.java:38)
at org.eclipse.lemminx.services.XMLLanguageService.findDocumentLinks(XMLLanguageService.java:232)
at org.eclipse.lemminx.XMLTextDocumentService.lambda$documentLink$12(XMLTextDocumentService.java:363)
at java.base/java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1236)
... 7 more
Open the given XML file:
The document link doesn't work for the uri attribute and you can see the error message:
If you remove DOCTYPE, it works good.
To fix theproblem we should check the node is an element https://github.com/eclipse/lemminx/blob/dbf43f3cae27a726c22e319eca939872c83fb3d8/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/extensions/catalog/CatalogUtils.java#L66
The text was updated successfully, but these errors were encountered: