Closed Azbesciak closed 5 years ago
Thank you for your feedback to the enRoute project
\
This is the useful bit of the error:
Unable to resolve org.apache.aries.javax.jax.rs-api [6](R 6.0):
missing requirement [org.apache.aries.javax.jax.rs-api [6](R 6.0)]
osgi.wiring.package; (osgi.wiring.package=javax.xml.bind.annotation)]
This tells us that we're missing the javax.xml.bind.annotation package, which would normally come from Java itself, so what's going on?
This is actually an issue with using Java 9 - as part of the goal of "making Java more modular" they actually removed packages from the default JRE launch! You can see a nice explanation in this bug on Stack Overflow
If you start your JRE with the relevant flag(s) then it will have the necessary package available and things will work.
Another option is to re-resolve the application for Java 9. This is actually more correct as it accurately represents the target that you're using to run the application. You can do this by changing the target execution environment in the various bndruns. This will result in the resolve operations generating a set of bundles including the JAXB API (as it's not provided from anywhere else), and everything should work fine in tests and at runtime.
A follow-up is in this issue https://github.com/bndtools/bnd/issues/2496
I believe that this issue is resolved - the templates now offer users the opportunity to select their target Java version.
Hello, I have the same issue, but I have Java 11. I don't understand what you mean with " If you start your JRE with the relevant flag(s) then it will have the necessary package available and things will work. " Can you help me with that ?
Hi, i was trying to build repo on java 9 (without changes at the first shot). As the result...:
I know java 8 is now mostly used so it is maybe not the-highest-priority, but it would be nice to see at least minimal working on java 9+ example. I changed the java version in
integration-test.bndrun
and mainpom.xml
just for test, but as you assume - didn't change a lot.