You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by "Leschke, Scott" <SL...@medline.com> on 2020/10/16 20:23:27 UTC

Manifest import problems

I'm getting the following with Karaf 4.2.9 and the latest BndTools 5.2.0REL. I'm confused by what's going on here.  Obviously importing of java.* packages is still required, or at least allowed.
This first stack trace is a WARN in the log while the second one is an ERROR.  Java 11 on Windows if that matters.

org.osgi.framework.BundleException: Importing java.* packages not allowed: java.io
                at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:349) ~[?:?]
                at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:181) ~[?:?]
                at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117) ~[?:?]
                at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1282) ~[?:?]
                at org.apache.felix.framework.BundleImpl.revise(BundleImpl.java:1219) ~[?:?]
                at org.apache.felix.framework.Felix.updateBundle(Felix.java:2388) ~[?:?]
                at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1018) ~[?:?]
                ....

org.osgi.framework.BundleException: Importing java.* packages not allowed: java.lang
                at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:349) ~[?:?]
                at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:181) ~[?:?]
                at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117) ~[?:?]
                at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1282) ~[?:?]
                at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:113) ~[?:?]
                at org.apache.felix.framework.Felix.installBundle(Felix.java:3042) ~[?:?]
                at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167) ~[?:?]
                ....

Thanks in advance,

Scott


RE: Manifest import problems

Posted by "Leschke, Scott" <SL...@medline.com>.
Hi JB,

Yes it does appear to be coming from Felix.

I have not tried Equinox but will do that.  In what .cfg file would I do ithis?

I checked and am not accidentally exporting any of the java.* packages.

Thanks,

Scott

From: Jean-Baptiste Onofre <jb...@nanthrax.net>
Sent: Friday, October 16, 2020 11:18 PM
To: user@karaf.apache.org
Subject: Re: Manifest import problems

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
________________________________
Hi Scott,

It seems to come directly from the Felix framework.

Did you try with equinox ?

Maybe you are exporting (by mistake) java.io<https://urldefense.com/v3/__http:/java.io__;!!PoMpmxQzTok3!ssFmKd2T8H3_wsxtA5gWHuSI88T1gulo0NZb9y_givYLX-DPH7dbuHLPsxPSPDE$> and java.lang packages ?

Regards
JB



Le 16 oct. 2020 à 22:23, Leschke, Scott <SL...@medline.com>> a écrit :

I’m getting the following with Karaf 4.2.9 and the latest BndTools 5.2.0REL. I’m confused by what’s going on here.  Obviously importing of java.* packages is still required, or at least allowed.
This first stack trace is a WARN in the log while the second one is an ERROR.  Java 11 on Windows if that matters.

org.osgi.framework.BundleException: Importing java.* packages not allowed: java.io<https://urldefense.com/v3/__http:/java.io/__;!!PoMpmxQzTok3!ssFmKd2T8H3_wsxtA5gWHuSI88T1gulo0NZb9y_givYLX-DPH7dbuHLPkTKniQk$>
                at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:349) ~[?:?]
                at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:181) ~[?:?]
                at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117) ~[?:?]
                at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1282) ~[?:?]
                at org.apache.felix.framework.BundleImpl.revise(BundleImpl.java:1219) ~[?:?]
                at org.apache.felix.framework.Felix.updateBundle(Felix.java:2388) ~[?:?]
                at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1018) ~[?:?]
                ….

org.osgi.framework.BundleException: Importing java.* packages not allowed: java.lang
                at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:349) ~[?:?]
                at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:181) ~[?:?]
                at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117) ~[?:?]
                at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1282) ~[?:?]
                at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:113) ~[?:?]
                at org.apache.felix.framework.Felix.installBundle(Felix.java:3042) ~[?:?]
                at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167) ~[?:?]
                ….

Thanks in advance,

Scott


RE: Manifest import problems

Posted by "Leschke, Scott" <SL...@medline.com>.
Never mind. I see it’s just
config.properties/karaf.framework

Scott

From: Leschke, Scott
Sent: Saturday, October 17, 2020 11:36 AM
To: 'user@karaf.apache.org' <us...@karaf.apache.org>
Subject: RE: Manifest import problems

Hi JB,

Yes it does appear to be coming from Felix.

I have not tried Equinox but will do that.  In what .cfg file would I do ithis?

I checked and am not accidentally exporting any of the java.* packages.

Thanks,

Scott

From: Jean-Baptiste Onofre <jb...@nanthrax.net>>
Sent: Friday, October 16, 2020 11:18 PM
To: user@karaf.apache.org<ma...@karaf.apache.org>
Subject: Re: Manifest import problems

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
________________________________
Hi Scott,

It seems to come directly from the Felix framework.

Did you try with equinox ?

Maybe you are exporting (by mistake) java.io<https://urldefense.com/v3/__http:/java.io__;!!PoMpmxQzTok3!ssFmKd2T8H3_wsxtA5gWHuSI88T1gulo0NZb9y_givYLX-DPH7dbuHLPsxPSPDE$> and java.lang packages ?

Regards
JB


Le 16 oct. 2020 à 22:23, Leschke, Scott <SL...@medline.com>> a écrit :

I’m getting the following with Karaf 4.2.9 and the latest BndTools 5.2.0REL. I’m confused by what’s going on here.  Obviously importing of java.* packages is still required, or at least allowed.
This first stack trace is a WARN in the log while the second one is an ERROR.  Java 11 on Windows if that matters.

org.osgi.framework.BundleException: Importing java.* packages not allowed: java.io<https://urldefense.com/v3/__http:/java.io/__;!!PoMpmxQzTok3!ssFmKd2T8H3_wsxtA5gWHuSI88T1gulo0NZb9y_givYLX-DPH7dbuHLPkTKniQk$>
                at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:349) ~[?:?]
                at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:181) ~[?:?]
                at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117) ~[?:?]
                at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1282) ~[?:?]
                at org.apache.felix.framework.BundleImpl.revise(BundleImpl.java:1219) ~[?:?]
                at org.apache.felix.framework.Felix.updateBundle(Felix.java:2388) ~[?:?]
                at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1018) ~[?:?]
                ….

org.osgi.framework.BundleException: Importing java.* packages not allowed: java.lang
                at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:349) ~[?:?]
                at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:181) ~[?:?]
                at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117) ~[?:?]
                at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1282) ~[?:?]
                at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:113) ~[?:?]
                at org.apache.felix.framework.Felix.installBundle(Felix.java:3042) ~[?:?]
                at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167) ~[?:?]
                ….

Thanks in advance,

Scott


Re: Manifest import problems

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Scott,

It seems to come directly from the Felix framework.

Did you try with equinox ?

Maybe you are exporting (by mistake) java.io <http://java.io/> and java.lang packages ?

Regards
JB


> Le 16 oct. 2020 à 22:23, Leschke, Scott <SL...@medline.com> a écrit :
> 
> I’m getting the following with Karaf 4.2.9 and the latest BndTools 5.2.0REL. I’m confused by what’s going on here.  Obviously importing of java.* packages is still required, or at least allowed.
> This first stack trace is a WARN in the log while the second one is an ERROR.  Java 11 on Windows if that matters.
>  
> org.osgi.framework.BundleException: Importing java.* packages not allowed: java.io <http://java.io/>
>                 at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:349) ~[?:?]
>                 at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:181) ~[?:?]
>                 at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117) ~[?:?]
>                 at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1282) ~[?:?]
>                 at org.apache.felix.framework.BundleImpl.revise(BundleImpl.java:1219) ~[?:?]
>                 at org.apache.felix.framework.Felix.updateBundle(Felix.java:2388) ~[?:?]
>                 at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1018) ~[?:?]
>                 ….
>  
> org.osgi.framework.BundleException: Importing java.* packages not allowed: java.lang
>                 at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:349) ~[?:?]
>                 at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:181) ~[?:?]
>                 at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117) ~[?:?]
>                 at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1282) ~[?:?]
>                 at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:113) ~[?:?]
>                 at org.apache.felix.framework.Felix.installBundle(Felix.java:3042) ~[?:?]
>                 at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167) ~[?:?]
>                 ….
>  
> Thanks in advance,
>  
> Scott