You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Richard Bryan (Jira)" <ji...@apache.org> on 2021/03/17 13:58:00 UTC

[jira] [Commented] (IGNITE-11668) OSGI: Self-imported package causes failure upon Karaf restart

    [ https://issues.apache.org/jira/browse/IGNITE-11668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17303445#comment-17303445 ] 

Richard Bryan commented on IGNITE-11668:
----------------------------------------

I believe this is the same error I am seeing with Ignite 2.8.1.  On initial run of karaf Ignite launches fine, but on the next run it fails with this:

09:44:30.613 ERROR [FelixDispatchQueue] FrameworkEvent ERROR
org.osgi.framework.BundleException: Unable to resolve tgcs-ignite-service-osgi [188](R 188.0): missing requirement [tgcs-ignite-service-osgi [188](R 188.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.ignite.osgi)(version>=2.8.0)(!(version>=3.0.0))) [caused by: Unable to resolve org.apache.ignite.ignite-osgi [130](R 130.0): missing requirement [org.apache.ignite.ignite-osgi [130](R 130.0)] osgi.wiring.host; (&(osgi.wiring.host=org.apache.ignite.ignite-core)(bundle-version>=0.0.0))] Unresolved requirements: [[tgcs-ignite-service-osgi [188](R 188.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.ignite.osgi)(version>=2.8.0)(!(version>=3.0.0)))]
 at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?]
 at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?]
 at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373) ~[?:?]
 at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) ~[?:?]
 at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]

If I delete the karaf cache (<karaf_home>/data/*) and restart, it runs correctly again.

> OSGI: Self-imported package causes failure upon Karaf restart
> -------------------------------------------------------------
>
>                 Key: IGNITE-11668
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11668
>             Project: Ignite
>          Issue Type: Bug
>          Components: osgi
>    Affects Versions: 2.7
>         Environment: Ignite 2.7
> Apache Karaf 4.2.0
>            Reporter: Oleksii Mohylin
>            Assignee: Oleksii Mohylin
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I've got problem using Ignite 2.7 in Apache Karaf 4.2.0. 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:
> {noformat}
> 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"
> {noformat}
> There is no problem with initial installation of my application into Karaf, although after Karaf ignite-osgi dependency is not resolved, and this exception in log:
> {noformat}
> 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)))]
> {noformat}
> *Proposed solution:*
>  remove the self-import by adding instruction to bundle plugin configuration in modules/osgi/pom.xml
> {code:java}
> <plugin>
>     <groupId>org.apache.felix</groupId>
>     <artifactId>maven-bundle-plugin</artifactId>
>     <configuration>
>         <instructions>
>             <Fragment-Host>org.apache.ignite.ignite-core</Fragment-Host>
>             <Import-Package>!org.apache.ignite.osgi.classloaders,*</Import-Package>
>         </instructions>
>     </configuration>
> </plugin>
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)