Also, I have kept the maven-bundle-plugin version as per the release notes (5.1.4) and output remains same.
About test application, I am trying the examples given in KARAF 4.2.15 binary distribution itself. I compiled those examples and tried to run it using the read me file and it is same Java.io wiring exception * https://archive.apache.org/dist/karaf/4.2.15/apache-karaf-4.2.15.tar.gz * Get into examples folder * mvn clean install * feature:repo-add mvn:org.apache.karaf.examples/karaf-servlet-example-features/LATEST/xml * karaf@root()> feature:install karaf-servlet-example-annotation * karaf@root()> feature:install karaf-servlet-example-registration Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve karaf-servlet-example-registration/4.4.2.SNAPSHOT: missing requirement [karaf-servlet-example-registration/4.4.2.SNAPSHOT] osgi.identity; osgi.identity=org.apache.karaf.examples.karaf-servlet-example-registration; type=osgi.bundle; version="[4.4.2.SNAPSHOT,4.4.2.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve org.apache.karaf.examples.karaf-servlet-example-registration/4.4.2.SNAPSHOT: missing requirement [org.apache.karaf.examples.karaf-servlet-example-registration/4.4.2.SNAPSHOT] osgi.wiring.package; filter:="(osgi.wiring.package=java.io)"] Regards Munish karaf@root()> feature:install karaf-servlet-example-registration org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=karaf-servlet-example-registration; type=karaf.feature; version="[4.4.2.SNAPSHOT,4.4.2.SNAPSHOT]"; filter:="(&(osgi.identity=karaf-servlet-example-registration)(type=karaf.feature)(version>=4.4.2.SNAPSHOT)(version<=4.4.2.SNAPSHOT))" [caused by: Unable to resolve karaf-servlet-example-registration/4.4.2.SNAPSHOT: missing requirement [karaf-servlet-example-registration/4.4.2.SNAPSHOT] osgi.identity; osgi.identity=org.apache.karaf.examples.karaf-servlet-example-registration; type=osgi.bundle; version="[4.4.2.SNAPSHOT,4.4.2.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve org.apache.karaf.examples.karaf-servlet-example-registration/4.4.2.SNAPSHOT: missing requirement [org.apache.karaf.examples.karaf-servlet-example-registration/4.4.2.SNAPSHOT] osgi.wiring.package; filter:="(osgi.wiring.package=java.io)"]] -----Original Message----- From: Munish Gupta Sent: Wednesday, September 7, 2022 4:54 PM To: dev@karaf.apache.org Subject: RE: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11 Hi JB, Taking clue from you reply, I had seen the etc\jre.properties. I think Java.io package is moved with jre-base module from JDK9 onwards and these packages are not present in etc\jre.properties. While it is present in the latest version of KARAF. I have tried to add this list of jre-base in properties and added ${jre-base}, \ in jre-9. Now it is failing with org.osgi.framework.BundleException: Exporting java.* packages not allowed: java.applet at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:861) jre-base= \ java.applet, \ java.awt, \ java.awt.color, \ java.awt.datatransfer, \ java.awt.dnd, \ java.awt.event, \ java.awt.font, \ java.awt.geom, \ java.awt.im, \ java.awt.im.spi, \ java.awt.image, \ java.awt.image.renderable, \ java.awt.print, \ java.beans, \ java.beans.beancontext, \ java.io, \ java.lang, \ java.lang.annotation, \ java.lang.constant, \ java.lang.instrument, \ java.lang.invoke, \ java.lang.management, \ java.lang.ref, \ java.lang.reflect, \ java.lang.runtime, \ java.math, \ java.net, \ java.net.http, \ java.nio, \ java.nio.channels, \ java.nio.channels.spi, \ java.nio.charset, \ java.nio.charset.spi, \ java.nio.file, \ java.nio.file.attribute, \ java.rmi, \ java.rmi.activation, \ java.rmi.dgc, \ java.rmi.registry, \ java.rmi.server, \ java.security, \ java.security.acl, \ java.security.cert, \ java.security.interfaces, \ java.security.spec, \ java.sql, \ java.text, \ java.text.spi, \ java.time, \ java.time.chrono, \ java.time.format, \ java.time.temporal, \ java.time.zone, \ java.util, \ java.util.concurrent, \ java.util.concurrent.atomic, \ java.util.concurrent.locks, \ java.util.function, \ java.util.random, \ java.util.jar, \ java.util.logging, \ java.util.prefs, \ java.util.regex, \ java.util.spi, \ java.util.stream, \ java.util.zip -----Original Message----- From: Jean-Baptiste Onofré <j...@nanthrax.net<mailto:j...@nanthrax.net>> Sent: Wednesday, September 7, 2022 2:14 PM To: dev <dev@karaf.apache.org<mailto:dev@karaf.apache.org>> Subject: Re: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11 I would check what's in etc/jre.properties for java.io. It could also depends to the maven-bundle-plugin version you are using to build your bundle (and OSGi R). If you have a simple test case in order for me to reproduce it, I can take a look. Regards JB On Wed, Sep 7, 2022 at 10:28 AM Munish Gupta <munis...@motivitylabs.com.invalid<mailto:munis...@motivitylabs.com.invalid>> wrote: > > Thanks for the reply JB. > > I am getting it while our product using KARAF runtime (4.2.15) is starting > with Open JDK 11. It was coming when KARAF is trying to deploy our > application specific bundle. > Later I downloaded KARAF binary distribution from website and tried to do KAR > install for examples shared there. It happened again there as well. > > Is there anything specific need to be mentioned as export OR import for these > java specific (Java.IO package) while using it with OpenJDK 11. I also might > be doing something wrong but some sort of clue can help here. > > Regards > Munish > > -----Original Message----- > From: Jean-Baptiste Onofré <j...@nanthrax.net<mailto:j...@nanthrax.net>> > Sent: Wednesday, September 7, 2022 1:34 PM > To: dev <dev@karaf.apache.org<mailto:dev@karaf.apache.org>> > Subject: Re: osgi.wiring.package; > filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11 > > Hi, > > Can you explain where you got this error ? Just starting the runtime ? > > Regards > JB > > On Tue, Sep 6, 2022 at 3:47 PM Munish Gupta > <munis...@motivitylabs.com.invalid<mailto:munis...@motivitylabs.com.invalid>> > wrote: > > > Hi Team, > > > > > > > > I’m using Karaf 4.2.15 in my project and when I’m trying to run the > > Karaf.bat command in the bin file I’m getting the below error log. > > > > > > > > osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" > > > > > > > > I have upgraded my JDK from 8 to 11 and then on I’m getting this issue. > > > > > > > > I have tried with plain karaf(4.2.15) and tried to install ( > > feature:install ) some examples which are provided in the karaf > > directory. Done the Maven build as per the directions given in the > > Read.Md document. Tried to install the feature:install > > karaf-servlet-example-registration . There also I am getting the > > same error. > > > > > > > > Please find the attached image for more information. > > > > > > > > I have tried with both JDK 1.8 and OpenJDK 11, both are yielding the > > same output. > > > > > > > > Can you help me find the issue here? > > > > > > > > Best Regards, > > > > *Munish Gupta* > > > > Technical Delivery Manager > > > > Mob: +91 9533735490 > > > > [image: Logo Description automatically generated] > > > > *[image: Logo Description automatically generated]* > > > > *[image: Logo Description automatically generated]* > > > > *[image: Text, logo Description automatically generated]* > > > > *US:* 222 W Las Colinas Blvd, Suite 1410N, Irving, Texas 75039. > > Ph. | +1 214.730.0798 > > > > *INDIA:* 6th floor, Dallas Center, > > Knowledge City, 83/1, Plot No A1, > > Raidurg, Hyderabad 500 032 > > > > Confidentiality Note : This message is confidential. It may also be > > privileged or otherwise protected by work product immunity or other > > legal rules. This email and any files transmitted with it are > > confidential and intended solely for the use of the individual or > > entity to whom they are addressed. If you have received it by > > mistake, please let us know by e-mail reply and delete it from your > > system; you may not copy this message or disclose its contents to anyone. > > > > > > > > > >