Hello JB,
thank you for your help!
The application is built with Java 8 and deploys fine if the Karaf
runtime is Java 11, but runs into the deployment issue if the Karaf
runtime is Java 8.
We specifically picked Karaf 4.2 as it is supposed to support Java 8.
And Camel 2.25 is Java 8 only as well. Which is why I am a bit confused
about how we end up with a dependency to a javax API implementation that
requires Java 9 as the runtime.
There should be a way to force the use of the JDK implementation of the
javax APIs? Apparently that worked alright with Karaf 4.0 from which I
am trying to upgrade the application.
Thanks again!
Ralf
On 22.12.21 08:18, Jean-Baptiste Onofre wrote:
Hi Ralf,
Are you using JDK8 or JDK11 ?
Jakarta Activation 1.2.2 bundle seems to require Java >= 9.
You have two options:
- wrap the bundle to remove ee requirement header (I did that in ActiveMQ
bundles for instance)
- upgrade to Java 11 ;)
Regards
JB
Le 21 déc. 2021 à 15:56, Ralf Steppacher <r...@steppacher.name> a écrit :
Hello all,
I am trying to migrate an application from Karaf 4.0 to Karaf 4.2.12, Camel
2.25, and Spring 5.3. Things work alright as long as I use Java 11 as the
runtime, but the application fails to resolve its activation framework
dependency as soon as I use Java 8 as the runtime because the activation bundle
pulled in appears to require a Java 9 runtime:
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve reportCreator/3.40.0.SNAPSHOT:
missing requirement [reportCreator/3.40.0.SNAPSHOT] osgi.wiring.package;
filter:="(&(osgi.wiring.package=javax.activation)(version>=1.2.0)(!(version>=2.0.0)))"
[caused by: Unable to resolve com.sun.activation.jakarta.activation/1.2.2: missing requirement
[com.sun.activation.jakarta.activation/1.2.2] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=9.0))"]
at
org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
... 14 more
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve
com.sun.activation.jakarta.activation/1.2.2: missing requirement
[com.sun.activation.jakarta.activation/1.2.2] osgi.ee;
filter:="(&(osgi.ee=JavaSE)(version=9.0))"
at
org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
... 15 more
As with Java 8 the javax namespace implementation is still included in the JDK
runtime I tried to add the javax.activation package(s) to the boot delegation
path and/or the extra system packages, but the result is always the same.
What am I missing here? Thanks in advance!
Ralf