Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAXB implementation OH 3.0.x (Java 11) #1855

Closed
kjoglum opened this issue Nov 28, 2020 · 2 comments
Closed

JAXB implementation OH 3.0.x (Java 11) #1855

kjoglum opened this issue Nov 28, 2020 · 2 comments
Labels
external bug A problem or unintended behavior of an external library

Comments

@kjoglum
Copy link

kjoglum commented Nov 28, 2020

The packages jakarta.xml.bind-api v2.3.3 and org.glassfish.jaxb/jaxb-runtime v2.3.3 seem to be recommended/required to enable JAXB for Java 11.

However, OH, using biz.aqute.bnd:bnd-maven-plugin:5.1.2:bnd-process fails to build when the mentioned packages are included as dependencies in binding pom.xml. Probably due to the multi-release nature of the packages.

Bnd error:

Classes found in the wrong directory:

META-INF/versions/9/javax/xml/bind/ModuleUtil.class=javax.xml.bind.ModuleUtil   
META-INF/versions/9/com/sun/xml/bind/v2/runtime/reflect/opt/Injector.class=com.sun.xml.bind.v2.runtime.reflect.opt.Injector 
META-INF/versions/9/com/sun/xml/bind/v2/runtime/reflect/opt/AccessorInjector.class=com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector 
META-INF/versions/9/com/sun/xml/bind/v2/runtime/reflect/opt/OptimizedTransducedAccessorFactory.class=com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedTransducedAccessorFactory 
META-INF/versions/9/com/sun/xml/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.class=com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory
@wborn
Copy link
Member

wborn commented Dec 6, 2020

You can probably workaround this by suppressing them with a -fixupmessages instruction, see bndtools/bnd#2227.

@wborn wborn added the external bug A problem or unintended behavior of an external library label Dec 6, 2020
@kjoglum
Copy link
Author

kjoglum commented Dec 6, 2020

Using -fixupmessages does not seem to work, but managed to work around for the source code of the external library, using the maven-shade-plugin and exclude for /META-INF/versions/*.

Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external bug A problem or unintended behavior of an external library
Projects
None yet
Development

No branches or pull requests

2 participants