Yes, this approach works if you use a Sun namespace compatible JVM.
On Thu, Jun 16, 2022 at 9:52 AM Martin Lichtin <lich...@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 <lich...@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) > >>