You have basically three options:

1. you put your jar in lib folder and update jre.properties
2. you create a clean bundle using jar (a shading)
3. you use "wrap" protocol (wrap:mvn:groupId/artifactId) that will create a bundle on the fly

Regards
JB

On 15/09/2021 13:45, Andrei Petru Mura wrote:
What do you mean by wrap?

On Wed, Sep 15, 2021 at 2:43 PM Jean-Baptiste Onofré <[email protected] <mailto:[email protected]>> wrote:

    You still have lib/jdk9plus for JDK9+ lib.

    However, in your case, I think it's better to use wrap.

    Regards
    JB

    On 15/09/2021 13:42, Andrei Petru Mura wrote:
     > Rectify a bit: it seems that $KARAF_HOME/lib/ext is no longer
    considered
     > in 4.3.2 for jre greater than 1.8.
     >
     > Andrei
     >
     > On Wed, Sep 15, 2021 at 2:40 PM Andrei Petru Mura
    <[email protected] <mailto:[email protected]>
     > <mailto:[email protected] <mailto:[email protected]>>> wrote:
     >
     >     OpenJDK, I used OpenJDK 16. If I switch to OpenJDK 1.8, I
    manage to
     >     fix the issue by adding the desired packages to
     >     $KARAF_HOME/jre.properties file.
     >     The following up question would be: how to add my own jar
    file (not
     >     OSGI compliant) to Karaf at startup, and made available the
     >     packages? Where should I put that Jar file? it seems that
     >     $KARAF_HOME/lib/ext is no longer considered in 4.3.2.
     >
     >     Thanks,
     >     Andrei
     >
     >     On Wed, Sep 15, 2021 at 2:34 PM JB Onofré <[email protected]
    <mailto:[email protected]>
     >     <mailto:[email protected] <mailto:[email protected]>>> wrote:
     >
     >         Hi
     >
     >         What’s your JDK version and provider ?
     >
     >         Regards
     >         JB
     >
     >>         Le 15 sept. 2021 à 12:51, Andrei Petru Mura
     >>         <[email protected] <mailto:[email protected]>
    <mailto:[email protected] <mailto:[email protected]>>> a écrit :
     >>
     >>         
     >>         Hi all,
     >>
     >>         I'm trying to upgrade to karaf 4.3.2. In the process, I
    try to
     >>         install xmlbeans with:
     >>         bundle:install -s
>>  mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlbeans/5.0.1_1
     >>
     >>         and it gives me this error:
     >>
     >>         Error starting bundle 241: Unable to resolve
     >>         org.apache.servicemix.bundles.xmlbeans [241](R 241.0):
    missing
     >>         requirement [org.apache.servicemix.bundles.xmlbeans [241](R
     >>         241.0)] osgi.wiring.package;
>>  (osgi.wiring.package=com.sun.org.apache.xml.internal.resolver)
     >>         Unresolved requirements:
     >>         [[org.apache.servicemix.bundles.xmlbeans [241](R 241.0)]
     >>         osgi.wiring.package;
>>  (*osgi.wiring.package=com.sun.org.apache.xml.internal.resolver*)]
     >>
     >>         I added this package in $KARAF_HOME/etc/jre.properties,
    under
     >>         jre-1.8 variable. It looks something like:
     >>
     >>         jre-1.8= \
     >>          ${jre-base}, \
     >>          java.time, \
     >>         ...
     >>          com.sun.nio.sctp, \
     >>          com.sun.org.apache.xml.internal.resolver
     >>
     >>         jre-9= \
     >>          ${jre-base}, \
     >>         ...
     >>
     >>         But still no luck.
     >>         Do you have any suggestions on this?
     >>
     >>         Thanks,
     >>         Andrei
     >

Reply via email to