Bug#912221: jabref: incompatible with openjdk 11

Emmanuel Bourg ebourg at apache.org
Tue Nov 6 21:31:25 GMT 2018


Hi Tony,

Le 06/11/2018 à 21:12, tony mancill a écrit :

> XJC="java -cp /usr/share/java/xml-resolver.jar:/usr/share/java/jaxb-api.jar:/usr/share/java/jaxb-core.jar:/usr/share/java/jaxb-impl.jar:/usr/share/java/jaxb-jxc.jar:/usr/share/java/jaxb-xjc.jar -jar /usr/share/java/jaxb-xjc.jar"
> 
> And it dies with this exception stack, despite the xml-resolver being on
> the classpath:

The -cp parameter doesn't work with -jar, that's why you keep getting
the ClassNotFoundException. Either all the jar files are specified
behind -cp and the main class is specified on the command line (i.e.
com.sun.tools.xjc.XJCFacade for xjc), or the jar executed has a proper
Class-Path attribute in its manifest (and indeed xml-resolver.jar isn't
listed in jaxb-xjc.jar).


> Can you help me understand why this patch
> (https://salsa.debian.org/java-team/jaxb/blob/master/debian/patches/04-xml-resolver-compatibility.patch)
> was necessary?  Perhaps it's related to the failure I'm seeing?

I don't think it's related. We simply use a different version of
xml-resolver. There is this rule in debian/maven.rules:

s/com.sun.org.apache.xml.internal/xml-resolver/ s/resolver/xml-resolver/

Sun/Oracle had to change the namespace of the libraries they embedded in
the JDK to avoid conflicts. But now that JAXB is no longer in the JDK
it's not needed, and we can directly use the original library instead.


> I've also started looking at updating jaxb 2.3.1, but it will 
> take me a bit of time.

I've also started digging into jaxb to address the compatibility with
Java 11. I've considered upgrading to the version 2.3.1 but it didn't
look that straightforward despite the minor version increment. I'm not
sure the upgrade is still compatible with Java 8 for example. So I think
I'll rather aim at a minor update simply adding the dependency on
libactivation-java, and later look at an upgrade.

Emmanuel Bourg



More information about the pkg-java-maintainers mailing list