[! [Введите описание изображения здесь] [1]] [1] Я получаю ошибку компиляции для классов, ссылающихся на org.xml.sax и xml-apis с использованием Eclipse 2019-03 и OpenJDK 11. Я удалил любой mavenзависимость от xml-apis, хотя она все еще отображается в репозитории Maven и указана в зависимостях Maven. Я установил зависимости Maven перед JDK в разделе «Порядок и экспорт пути сборки проекта» и наоборот, но без надежды.
import org.xml.sax.*;
import org.xml.sax.ext.*;
import org.xml.sax.helpers.XMLReaderFactory;
import org.xml.sax.helpers.DefaultHandler;
Мне пришлось добавить обновление из-за ограниченной длины комментария:
Да, я проверил иерархию зависимостей Maven и обнаружил, что зависимость Maven
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.5.6-Final</version>
</dependency> --> AND <!-- <dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
</dependency> --> ```
includes xml-apis, I have commented that out both dependencies, but then I got compilation error to a class that refers to "org.apache.xerces.parsers.DOMParser" that I have to uncomment "xerces" dependency again and of course same problem happening because JDK have the classpath for java.xml which includes "org.w3.dom" and "rg.xml.sax"
[![enter image description here][2]][2]
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/m1li4.jpg