You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Martin Lichtin <li...@yahoo.com> on 2022/06/14 10:58:13 UTC

Karaf 4.3.7 - cannot load 'agrona' bundle

Any idea why Karaf would not expose "sun.nio.ch" package?

Trying to load

<bundle>mvn:org.agrona/agrona/1.8.0</bundle>

provokes

Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to 
resolve org.agrona.core/1.8.0: missing requirement 
[org.agrona.core/1.8.0] osgi.wiring.package; 
filter:="(osgi.wiring.package=sun.nio.ch)" at 
org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) 


Re: Karaf 4.3.7 - cannot load 'agrona' bundle

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Yes, this approach works if you use a Sun namespace compatible JVM.

On Thu, Jun 16, 2022 at 9:52 AM Martin Lichtin <li...@yahoo.com> wrote:
>
> Thanks.
> What worked well was adding this package in config.properties to the
> "org.osgi.framework.system.packages.extra" list.
> So this is not a package one would consider adding to jre.properties
>
> On 16/06/2022 09:35, Jean-Baptiste Onofré wrote:
> > Hi
> >
> > agrona bundle should define "sun.nio.ch" package as optional.
> >
> > You can use wrap to change the headers.
> >
> > Regards
> > JB
> >
> > On Tue, Jun 14, 2022 at 12:58 PM Martin Lichtin <li...@yahoo.com> wrote:
> >> Any idea why Karaf would not expose "sun.nio.ch" package?
> >>
> >> Trying to load
> >>
> >> <bundle>mvn:org.agrona/agrona/1.8.0</bundle>
> >>
> >> provokes
> >>
> >> Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to
> >> resolve org.agrona.core/1.8.0: missing requirement
> >> [org.agrona.core/1.8.0] osgi.wiring.package;
> >> filter:="(osgi.wiring.package=sun.nio.ch)" at
> >> org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
> >>

Re: Karaf 4.3.7 - cannot load 'agrona' bundle

Posted by Martin Lichtin <li...@yahoo.com>.
Thanks.
What worked well was adding this package in config.properties to the 
"org.osgi.framework.system.packages.extra" list.
So this is not a package one would consider adding to jre.properties

On 16/06/2022 09:35, Jean-Baptiste Onofré wrote:
> Hi
>
> agrona bundle should define "sun.nio.ch" package as optional.
>
> You can use wrap to change the headers.
>
> Regards
> JB
>
> On Tue, Jun 14, 2022 at 12:58 PM Martin Lichtin <li...@yahoo.com> wrote:
>> Any idea why Karaf would not expose "sun.nio.ch" package?
>>
>> Trying to load
>>
>> <bundle>mvn:org.agrona/agrona/1.8.0</bundle>
>>
>> provokes
>>
>> Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to
>> resolve org.agrona.core/1.8.0: missing requirement
>> [org.agrona.core/1.8.0] osgi.wiring.package;
>> filter:="(osgi.wiring.package=sun.nio.ch)" at
>> org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
>>

Re: Karaf 4.3.7 - cannot load 'agrona' bundle

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi

agrona bundle should define sun.nio.ch package as optional.

You can use wrap to change the headers.

Regards
JB

On Tue, Jun 14, 2022 at 12:58 PM Martin Lichtin <li...@yahoo.com> wrote:
>
> Any idea why Karaf would not expose "sun.nio.ch" package?
>
> Trying to load
>
> <bundle>mvn:org.agrona/agrona/1.8.0</bundle>
>
> provokes
>
> Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to
> resolve org.agrona.core/1.8.0: missing requirement
> [org.agrona.core/1.8.0] osgi.wiring.package;
> filter:="(osgi.wiring.package=sun.nio.ch)" at
> org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
>