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(BuiltinClassLoader.java:583)
> 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> 	at org.eclipse.osgi.internal.framework.ContextFinder.loadClass(ContextFinder.java:135)
> 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> 	at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:480)
> 	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:184)
> 	... 106 more
> 
> Has anyone else seen this and come up with a workaround other than rewrites?

Would https://bugs.eclipse.org/bugs/show_bug.cgi?id=541264#c15 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.

Cheers,
-- 
Roland Grunberg



Back to the top