Skip to content
This repository has been archived by the owner on Jun 26, 2022. It is now read-only.

Eclipse refuses to compile source code which references w3c.org.dom.* with xml-apis present on classpath

Notifications You must be signed in to change notification settings

runeflobakk/org-w3c-dom-troubles

Repository files navigation

Bundling classes from org.w3c.dom

There are certain artifacts which bundle a tiny amount of classes/interfaces from the org.w3c.dom package, and they will cause problems. In particular, if you have any of these on your classpath, you may encounter compile errors with your own code trying to refer to anything under the org.w3c.dom package:

  • Jaxen 1.1.6 (should be fixed in 1.2.0)
  • xom 1.2.5
  • xercesImpl 2.8.0

Ref: https://bugs.eclipse.org/bugs/show_bug.cgi?id=536928#c73

Error in Eclipse Photon 4.11 Java editor (fixed in 4.12M1)

The issue described below is verified fixed in version 4.12M1: https://bugs.eclipse.org/bugs/show_bug.cgi?id=545687

This project isolates a certain aspect of this issue: bugs.eclipse.org/bugs/show_bug.cgi?id=536928

Eclipse refuses to compile source code which references w3c.org.dom.* with xml-apis present on classpath:

compile error

This compiles fine with javac. Excluding xml-apis from classpath will make the source compile also with the Eclipse compiler. But it seems like the error is still present in the editor view even after excluding xml-apis as a transitive dependency of e.g. xercesImpl, but the "red markers" disappears from the Project Explorer view. Eclipse manages to compile the source code, even though the editor shows errors.

With xml-apis on classpath

editor-error explorer-with-xmlapis

Without xml-apis on classpath

editor-error explorer-without-xmlapis

About

Eclipse refuses to compile source code which references w3c.org.dom.* with xml-apis present on classpath

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages