You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Oleksii Mohylin (JIRA)" <ji...@apache.org> on 2019/04/10 08:32: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=16814194#comment-16814194 ]
Oleksii Mohylin commented on IGNITE-11668:
------------------------------------------
Package org.apache.ignite.osgi.classloaders was removed from package imports for ignite-osgi bundle. Pull request is attached.
> 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
(v7.6.3#76005)