eclipse-jdtls / eclipse.jdt.ls

Java language server
1.76k stars 392 forks source link

The package org.xml.sax.helpers is accessible from more than one module #1050

Closed Yanpas closed 4 years ago

Yanpas commented 5 years ago

I have these errors with following packages:

The package org.xml.sax.helpers is accessible from more than one module

I have oozie-4.1.0-cdh5.7.6/xml-apis-1.4.01.jar and this API is shipped with java. Can JDTLS choose any of those packages and put warning instead of an error?

fbricon commented 5 years ago

can you provide a sample project reproducing this error?

Yanpas commented 5 years ago

here is sample project failp.zip

Yanpas commented 5 years ago

Eclipse fails as well

The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

vorburger commented 4 years ago

ran into this in FINERACT-940 and found some background re. this here:

fbricon commented 4 years ago

thanks @vorburger, I recently replied to another user was facing similar issue earlier today: https://github.com/redhat-developer/vscode-java/issues/1437#issuecomment-625728430

TL;DR: it's the expected behavior, javac should fail to compile instead (see above links). @Yanpas sorry but there's nothing we can do in jdt.ls about it, it all happens upstream.

fbricon commented 4 years ago

You simply need to exclude xml-api from your dependencies, when compiling against JDK > 1.8

llech commented 2 years ago

I've just stumbled upon that error in one of my projects that works perfectly. We have a stable CI pipeline, maven builds with java 11 and 17 without issues. It's only Eclipse that shows those virtual errors.

I've switched to IntelliJ which solved the issue. Not the way the Eclipse maintainers have probably intended, but this is the result of ignoring the input from your users.

vorburger commented 2 years ago

I've switched to IntelliJ which solved the issue. Not the way the Eclipse maintainers have probably intended, but this is the result of ignoring the input from your users.

@llech Sali Du, säg emol, was hast Du denn eigentlich genau contributed wo to open source, which makes you feel like you have any right to publicly bash anyone like that? This is completely inappropriate, outright rude, and also shows that you have absolutely no idea what you are talking about re. open source. What on earth makes you think you are in any position to lecture anyone having anything to do with a community project you use completely for free? Help to improve what you need for your work! Or use something else - great for you! But save these kind of comments for your /dev/null. I'm just always genuinely stunned whenever I read these kinds of comments anywhere.