I’m trying to use Smack 4.4.0-alpha1 but this applies to older versions too.
When compiling using Java 11 (and I guess from 9 and later) I get this compilation error
Error:java: the unnamed module reads package javax.xml.namespace from both java.xml and xpp3
This is because the xpp3 JAR includes the javax.xml.namespace.QName class. Something that has been a problem since java 1.5 which included that class in the JDK. Mostly it’s been passing under the radar since the classloader has just picked one of them but with a module path this is stricter.
The XPP3 maintainer has an issue in his Jira since 2017 (https://github.com/aslom/xpp3/issues/2) but does not seem to make any progress.
I’ve tried to exclude the XPP3 and use kxml2 instead but that has other problems and is not usable with Jigsaw modules.
If anyone knows of a work-around I’d be happy because I’m sort of stuck.