[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} > > org.apache.felix > maven-bundle-plugin > > > org.apache.ignite.ignite-core > > !org.apache.ignite.osgi.classloaders,* > > > > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (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:all-tabpanel ] Oleksii Mohylin updated IGNITE-11668: - Environment: Ignite 2.7 Apache Karaf 4.2.0 > 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} > > org.apache.felix > maven-bundle-plugin > > > org.apache.ignite.ignite-core > > !org.apache.ignite.osgi.classloaders,* > > > > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (IGNITE-11662) Wrong classloader is used to unmarshal joining node data
[ https://issues.apache.org/jira/browse/IGNITE-11662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleksii Mohylin updated IGNITE-11662: - Ignite Flags: (was: Docs Required) > Wrong classloader is used to unmarshal joining node data > > > Key: IGNITE-11662 > URL: https://issues.apache.org/jira/browse/IGNITE-11662 > Project: Ignite > Issue Type: Bug >Affects Versions: 2.7 > Environment: Ignite 2.7 > Karaf 4.2.0 >Reporter: Oleksii Mohylin >Assignee: Oleksii Mohylin >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > When a cluster coordinator node is running in Karaf container it cannot > accept joining requests from other nodes. Problem lies in unability to > unmarshal joining node data in > org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.validateNode() > This line > {code:java} > joiningNodeState = marsh.unmarshal((byte[]) discoData.joiningNodeData(), > Thread.currentThread().getContextClassLoader());{code} > fails with > {noformat} > Error on unmarshalling discovery data from node > 10.0.2.15,127.0.0.1,172.17.0.1:47501: Failed to find class with given class > loader for unmarshalling (make sure same versions of all classes are > available on all nodes or enable peer-class-loading) > [clsLdr=jdk.internal.loader.ClassLoaders$AppClassLoader@5c0369c4, > cls=org.apache.ignite.internal.processors.cluster.DiscoveryDataClusterState]; > node is not allowed to join{noformat} > Apparently problem is wrong classloader returned by > {code:java} > Thread.currentThread().getContextClassLoader()){code} > which is not the one created in IgniteAbstractOsgiContextActivator.start(). > *Proposed fix:* > use proper way of obtaining classloader: > {code:java} > U.resolveClassLoader(ctx.config()){code} > Like in other places. i.e. in GridClusterStateProcessor.collectGridNodeData(). > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (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:all-tabpanel ] Oleksii Mohylin updated IGNITE-11668: - Ignite Flags: (was: Docs Required) > 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 >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} > > org.apache.felix > maven-bundle-plugin > > > org.apache.ignite.ignite-core > > !org.apache.ignite.osgi.classloaders,* > > > > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (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:all-tabpanel ] Oleksii Mohylin reassigned IGNITE-11668: Assignee: Oleksii Mohylin > 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 >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} > > org.apache.felix > maven-bundle-plugin > > > org.apache.ignite.ignite-core > > !org.apache.ignite.osgi.classloaders,* > > > > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (IGNITE-11662) Wrong classloader is used to unmarshal joining node data
[ https://issues.apache.org/jira/browse/IGNITE-11662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleksii Mohylin reassigned IGNITE-11662: Assignee: Oleksii Mohylin > Wrong classloader is used to unmarshal joining node data > > > Key: IGNITE-11662 > URL: https://issues.apache.org/jira/browse/IGNITE-11662 > Project: Ignite > Issue Type: Bug >Affects Versions: 2.7 > Environment: Ignite 2.7 > Karaf 4.2.0 >Reporter: Oleksii Mohylin >Assignee: Oleksii Mohylin >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > When a cluster coordinator node is running in Karaf container it cannot > accept joining requests from other nodes. Problem lies in unability to > unmarshal joining node data in > org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.validateNode() > This line > {code:java} > joiningNodeState = marsh.unmarshal((byte[]) discoData.joiningNodeData(), > Thread.currentThread().getContextClassLoader());{code} > fails with > {noformat} > Error on unmarshalling discovery data from node > 10.0.2.15,127.0.0.1,172.17.0.1:47501: Failed to find class with given class > loader for unmarshalling (make sure same versions of all classes are > available on all nodes or enable peer-class-loading) > [clsLdr=jdk.internal.loader.ClassLoaders$AppClassLoader@5c0369c4, > cls=org.apache.ignite.internal.processors.cluster.DiscoveryDataClusterState]; > node is not allowed to join{noformat} > Apparently problem is wrong classloader returned by > {code:java} > Thread.currentThread().getContextClassLoader()){code} > which is not the one created in IgniteAbstractOsgiContextActivator.start(). > *Proposed fix:* > use proper way of obtaining classloader: > {code:java} > U.resolveClassLoader(ctx.config()){code} > Like in other places. i.e. in GridClusterStateProcessor.collectGridNodeData(). > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (IGNITE-11668) OSGI: Self-imported package causes failure upon Karaf restart
Oleksii Mohylin created IGNITE-11668: Summary: 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 Reporter: Oleksii Mohylin 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} org.apache.felix maven-bundle-plugin org.apache.ignite.ignite-core !org.apache.ignite.osgi.classloaders,* {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (IGNITE-11662) Wrong classloader is used to unmarshal joining node data
Oleksii Mohylin created IGNITE-11662: Summary: Wrong classloader is used to unmarshal joining node data Key: IGNITE-11662 URL: https://issues.apache.org/jira/browse/IGNITE-11662 Project: Ignite Issue Type: Bug Affects Versions: 2.7 Environment: Ignite 2.7 Karaf 4.2.0 Reporter: Oleksii Mohylin When a cluster coordinator node is running in Karaf container it cannot accept joining requests from other nodes. Problem lies in unability to unmarshal joining node data in org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.validateNode() This line {code:java} joiningNodeState = marsh.unmarshal((byte[]) discoData.joiningNodeData(), Thread.currentThread().getContextClassLoader());{code} fails with {noformat} Error on unmarshalling discovery data from node 10.0.2.15,127.0.0.1,172.17.0.1:47501: Failed to find class with given class loader for unmarshalling (make sure same versions of all classes are available on all nodes or enable peer-class-loading) [clsLdr=jdk.internal.loader.ClassLoaders$AppClassLoader@5c0369c4, cls=org.apache.ignite.internal.processors.cluster.DiscoveryDataClusterState]; node is not allowed to join{noformat} Apparently problem is wrong classloader returned by {code:java} Thread.currentThread().getContextClassLoader()){code} which is not the one created in IgniteAbstractOsgiContextActivator.start(). *Proposed fix:* use proper way of obtaining classloader: {code:java} U.resolveClassLoader(ctx.config()){code} Like in other places. i.e. in GridClusterStateProcessor.collectGridNodeData(). -- This message was sent by Atlassian JIRA (v7.6.3#76005)