Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Java 11 (OpenJDK 11): javax.xml.bind package removed

On Tue, 2018-12-04 at 14:02 -0500, Nitin Dahyabhai wrote:
> Trying to actually use the existing version under an AdoptOpenJDK 11 build to marshal/unmarshal runs into problems:
> Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory
> 	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(
> 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(
> 	at java.base/java.lang.ClassLoader.loadClass(
> 	at org.eclipse.osgi.internal.framework.ContextFinder.loadClass(
> 	at java.base/java.lang.ClassLoader.loadClass(
> 	at javax.xml.bind.ContextFinder.safeLoadClass(
> 	at javax.xml.bind.ContextFinder.newInstance(
> 	... 106 more
> Has anyone else seen this and come up with a workaround other than rewrites?

Would be a
possibility in your case ? Basically, just replacing mentions of
'org.eclipse.ptp.rm.jaxb.core' in that example, with the bundle that
actually requires 'javax.xml.bind' in your case.

When I looked in ContextFinder, it did seem possible to override the
default behaviour of looking up ContextFactory from the JRE.

Roland Grunberg

Back to the top