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
> 
> 

Reply via email to