You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Munish Gupta <mu...@motivitylabs.com.INVALID> on 2022/09/06 13:47:27 UTC
osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11
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
[Logo Description automatically generated]
[Logo Description automatically generated]
[Logo Description automatically generated]
[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.
Re: facing issues while upgrading application running on KARAF 4.2.15 (runtime) from OpenJDK 8 to 11
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
I replied to your other email ;)
Regards
JB
On Wed, Sep 7, 2022 at 4:20 AM Munish Gupta
<mu...@motivitylabs.com.invalid> wrote:
>
> Hi Team,
>
> I'm using Karaf 4.2.15 in my project and it is going good with JDK 8 (Oracle / OpenJDK). We were trying to upgrade JDK from 8 to 11 since KARAF 4.2.15 supports it.
> After upgrading, while brining the server up, I am facing this error.
>
> osgi.wiring.package; filter:="(osgi.wiring.package=java.io)"
>
> Can you give me some clues here about what could be probable reason?
>
> Best Regards,
> Munish Gupta
facing issues while upgrading application running on KARAF 4.2.15 (runtime) from OpenJDK 8 to 11
Posted by Munish Gupta <mu...@motivitylabs.com.INVALID>.
Hi Team,
I'm using Karaf 4.2.15 in my project and it is going good with JDK 8 (Oracle / OpenJDK). We were trying to upgrade JDK from 8 to 11 since KARAF 4.2.15 supports it.
After upgrading, while brining the server up, I am facing this error.
osgi.wiring.package; filter:="(osgi.wiring.package=java.io)"
Can you give me some clues here about what could be probable reason?
Best Regards,
Munish Gupta
RE: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11
Posted by Munish Gupta <mu...@motivitylabs.com.INVALID>.
Hi JB,
For a quick reference, I have attached karaf-servlet-example (JDK11) for KARAF 4.4.1 and KARAF 4.2.15. for KARAF 4.4.1 JDK11 , example application is working fine and getting active while for 4.2.15 JDK11 , it is failing with “Java.Io”.
These are the steps as per read me file
* 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
Regards
Munish
From: Munish Gupta
Sent: Wednesday, September 7, 2022 6:57 PM
To: dev@karaf.apache.org
Subject: RE: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11
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<ma...@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é <jb...@nanthrax.net>>
Sent: Wednesday, September 7, 2022 2:14 PM
To: dev <de...@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 <mu...@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é <jb...@nanthrax.net>>
> Sent: Wednesday, September 7, 2022 1:34 PM
> To: dev <de...@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 <mu...@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.
> >
> >
> >
> >
> >
RE: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11
Posted by Munish Gupta <mu...@motivitylabs.com.INVALID>.
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é <jb...@nanthrax.net>>
Sent: Wednesday, September 7, 2022 2:14 PM
To: dev <de...@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 <mu...@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é <jb...@nanthrax.net>>
> Sent: Wednesday, September 7, 2022 1:34 PM
> To: dev <de...@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 <mu...@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.
> >
> >
> >
> >
> >
RE: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11
Posted by Munish Gupta <mu...@motivitylabs.com.INVALID>.
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é <jb...@nanthrax.net>
Sent: Wednesday, September 7, 2022 2:14 PM
To: dev <de...@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 <mu...@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é <jb...@nanthrax.net>
> Sent: Wednesday, September 7, 2022 1:34 PM
> To: dev <de...@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 <mu...@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.
> >
> >
> >
> >
> >
Re: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11
Posted by Robert Varga <ni...@hq.sk>.
On 07/09/2022 11:10, Siano, Stephan wrote:
> Hi,
Hello,
> I thing there is a difference in the OSGi specs about importing java.* packages.
> The OSGI core spec 6.0 says in section 3.4:
> Bundles do not import the java.* packages and can therefore not specify their dependencies on
> these variations in the environment using the Import-Package header. The OSGi Execution Environment defines how frameworks can inform bundles about the available execution environments. The
> primary purpose of an execution environment is to define the variations in the java.* namespace,
> an execution environment can also include packages in other namespaces.
>
> The OSGi core spec 7.0 says in section 3.4:
> For Java platform versions prior to Java SE 9, the Framework must also set the org.osgi.framework.system.packages launching property to the list of Java platform packages generally known to be available at runtime. Since there is no standard way to interrogate the Java platform for the packages currently available at runtime, a Framework implementation may use a predefined list of packages for the Java platform version.
>
> In additional to specifying the version of the execution environment via an osgi.ee requirement, see osgi.ee Namespace, a Bundle may also import java.* packages using the Import-Package header. Imports of java.* packages by a bundle will be used during the resolution process, see Resolving Process, to ensure the bundle has visibility to the requested packages by wiring the bundle's import of a java.* package to the export of the java.* package by the Framework's system bundle. However, a bundle always loads classes in java.* packages via parent delegation. See Parent Delegation. Therefore, a bundle is not required to import a java.* package to have visibility to the classes in the package, if the package is present in the current runtime. It only needs to import a java.* package to have the resolution process ensure the package is available from the execution environment. This can avoid a NoClassDefFoundError during execution of the bundle due to a missing java.* package required by the bundle.
>
> Is it possible that importing a java.* package is only valid for OSGi 7.0 upwards. Doesn't karaf 4.2 only implement the OSGi 6.0 spec? AFAIK 7.0 is implemented in Karaf 4.3 and 8.0 is implemented in 4.4.
Not only that, but bnd's default behaviour depends on Java/OSGi
requirements discovered at compile-time:
https://github.com/bndtools/bnd/issues/2507
Regards,
Robert
>
> Best regards
> Stephan
>
> -----Original Message-----
> From: Jean-Baptiste Onofré <jb...@nanthrax.net>
> Sent: Wednesday, 7 September 2022 10:44
> To: dev <de...@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 <mu...@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é <jb...@nanthrax.net>
>> Sent: Wednesday, September 7, 2022 1:34 PM
>> To: dev <de...@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 <mu...@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.
>>>
>>>
>>>
>>>
>>>
RE: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11
Posted by "Siano, Stephan" <st...@sap.com.INVALID>.
Hi,
I thing there is a difference in the OSGi specs about importing java.* packages.
The OSGI core spec 6.0 says in section 3.4:
Bundles do not import the java.* packages and can therefore not specify their dependencies on
these variations in the environment using the Import-Package header. The OSGi Execution Environment defines how frameworks can inform bundles about the available execution environments. The
primary purpose of an execution environment is to define the variations in the java.* namespace,
an execution environment can also include packages in other namespaces.
The OSGi core spec 7.0 says in section 3.4:
For Java platform versions prior to Java SE 9, the Framework must also set the org.osgi.framework.system.packages launching property to the list of Java platform packages generally known to be available at runtime. Since there is no standard way to interrogate the Java platform for the packages currently available at runtime, a Framework implementation may use a predefined list of packages for the Java platform version.
In additional to specifying the version of the execution environment via an osgi.ee requirement, see osgi.ee Namespace, a Bundle may also import java.* packages using the Import-Package header. Imports of java.* packages by a bundle will be used during the resolution process, see Resolving Process, to ensure the bundle has visibility to the requested packages by wiring the bundle's import of a java.* package to the export of the java.* package by the Framework's system bundle. However, a bundle always loads classes in java.* packages via parent delegation. See Parent Delegation. Therefore, a bundle is not required to import a java.* package to have visibility to the classes in the package, if the package is present in the current runtime. It only needs to import a java.* package to have the resolution process ensure the package is available from the execution environment. This can avoid a NoClassDefFoundError during execution of the bundle due to a missing java.* package required by the bundle.
Is it possible that importing a java.* package is only valid for OSGi 7.0 upwards. Doesn't karaf 4.2 only implement the OSGi 6.0 spec? AFAIK 7.0 is implemented in Karaf 4.3 and 8.0 is implemented in 4.4.
Best regards
Stephan
-----Original Message-----
From: Jean-Baptiste Onofré <jb...@nanthrax.net>
Sent: Wednesday, 7 September 2022 10:44
To: dev <de...@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 <mu...@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é <jb...@nanthrax.net>
> Sent: Wednesday, September 7, 2022 1:34 PM
> To: dev <de...@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 <mu...@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.
> >
> >
> >
> >
> >
Re: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
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
<mu...@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é <jb...@nanthrax.net>
> Sent: Wednesday, September 7, 2022 1:34 PM
> To: dev <de...@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 <mu...@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.
> >
> >
> >
> >
> >
RE: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11
Posted by Munish Gupta <mu...@motivitylabs.com.INVALID>.
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é <jb...@nanthrax.net>
Sent: Wednesday, September 7, 2022 1:34 PM
To: dev <de...@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 <mu...@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.
>
>
>
>
>
Re: osgi.wiring.package; filter:="(osgi.wiring.package=java.io)" for JDK upgrade from 8 to 11
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
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
<mu...@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.
>
>
>
>
>