Hello! OSGi/Karaf don't see that much action and bugs are certainly possible. If you think there is a bug you should file an issue against our JIRA and propose a fix. Optimally if there is a test case which highlights the issue.
Regards, -- Ilya Kasnacheev пт, 25 янв. 2019 г. в 18:33, Oleksii Mohylin <[email protected]>: > Hello > > > > I’ve got problem using Ignite 2.7.0 in Apache Karaf. I believe the problem > is caused by strange bundle meta of ignite-osgi. It exports package > org.apache.ignite.osgi.classloaders and imports it at the same time. Here’s > extract from METADATA.MF: > > > > Import-Package: org.apache.ignite;version="[2.7,3)",org.apache.ignite. > > configuration;version="[2.7,3)",org.apache.ignite.internal.util;versi > > on="[2.7,3)",org.apache.ignite.internal.util.tostring;version="[2.7,3 > > )",org.apache.ignite.internal.util.typedef.internal;version="[2.7,3)" > > ,org.apache.ignite.osgi.classloaders,org.osgi.framework;version="[1.7 > > ,2)" > > Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))" > > Fragment-Host: org.apache.ignite.ignite-core > > Export-Package: org.apache.ignite.osgi.classloaders;uses:="org.apache. > > ignite.internal.util.tostring,org.osgi.framework";version="2.7.0",org > > .apache.ignite.osgi;uses:="org.apache.ignite,org.apache.ignite.config > > uration,org.apache.ignite.osgi.classloaders,org.osgi.framework";versi > > on="2.7.0" > > > > I have no problem with initial installation of my application into Karaf, > although after I restart Karaf ignite-osgi dependency is not resolved, and > I see this exception in log: > > > > org.osgi.framework.BundleException: Unable to resolve graphql-core [399](R > 399.0): missing requirement [graphql-core [399](R 399.0)] > osgi.wiring.package; > (&(osgi.wiring.package=org.apache.ignite.osgi.classloaders)(version>=2.7.0)(!(version>=3.0.0))) > [caused by: Unable to resolve org.apache.ignite.ignite-osgi [432](R 432.0): > missing requirement [org.apache.ignite.ignite-osgi [432](R 432.0)] > osgi.wiring.host; > (&(osgi.wiring.host=org.apache.ignite.ignite-core)(bundle-version>=0.0.0))] > Unresolved requirements: [[graphql-core [399](R 399.0)] > osgi.wiring.package; > (&(osgi.wiring.package=org.apache.ignite.osgi.classloaders)(version>=2.7.0)(!(version>=3.0.0)))] > > > > I made a set of simple bundles which model this situation (Bundle A > imports packages from Bundle B and Bundle C, where Bundle C is fragment for > bundle B and bundle C has similar setup in exports and imports) and > confirmed that removing the self-import solves the problem. > > > > Then I hacked into ignite-osgi JAR, manually edited MANIFEST.MF and > removed the problematic import of org.apache.ignite.osgi.classloaders. The > issue with missing ignite-osgi dependency didn’t reproduce with hacked > bundle installed in Karaf instead of bundle from Maven. > > > > This self-import looks like a bug to me. Although I can see that the > import was introduced in version 2.4.0, which was released quite long ago > and that makes me to think that import of the package which causes problems > to me might be added on purpose and not just a bug. > > > > Any ideas whether it’s bug or not? > > >
