Get Java package collision errors even though removed offending duplicating module
I keep getting errors under "problems" about the package org.w3c.dom is accessible from more than one module after moving to Java 14 from 8. After doing research, what I thought was the culprit was the indirect inclusion of the xml-apis dependency which I promptly exluded using the following in my build.gradle:
configurations {
all*.exclude group: 'xml-apis', module: 'xml-apis'
}
I verified this did indeed remove this dependency and everything compiles cleanly from the command line. however, even after limiting modules using
--limit-module java.base,java.desktop,java.sql,java.naming
gradle arguments, I still have a bunch of "problems" in the console related to this package collision across multiple module:
The package javax.xml.parsers is accessible from more than one module:
I have a sample vscode project which reproduces the issue here:
https://github.com/mentaloaf/vscode-examples.git
Environment
Red-hot Language Support for Java version is 0.72.0
java version "14.0.1" 2020-04-14 Java(TM) SE Runtime Environment (build 14.0.1+7) Java HotSpot(TM) 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
VS Code Version: 1.51.1 Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f Date: 2020-11-11T01:11:34.018Z (3 wks ago) Electron: 9.3.3 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Darwin x64 18.7.0
Steps To Reproduce
- Clone the GitHub example above.
- Add the top level folder to a vscode workspace.
- Open up the "Problems" and see the errors once the language server has processed the project.
Current Result
Package collision errors in org.w3c.dom package
Expected Result
None of these errors should exist since I removed the offending Java module in the xml-apis dependency.
Did anyone figure out a solution for this ?
This is still an issue with vscode 1.62.1, Java Language Support version 1.0.0. Any status updates?
I have the same issue, with latest VSC and extension, JDK 11.0.11 on Windows 10.