[jira] [Updated] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Offenbach updated FELIX-4854: -- Attachment: FELIX-4854.zip Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.6.1 Reporter: Jens Offenbach Labels: framework, resolution, wiring Fix For: framework-4.8.0 Attachments: FELIX-4854.zip I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different version that export the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case why we have a different wiring in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Offenbach updated FELIX-4854: -- Priority: Critical (was: Major) Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.6.1 Reporter: Jens Offenbach Priority: Critical Labels: framework, resolution, wiring Fix For: framework-4.8.0 Attachments: FELIX-4854.zip I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} The use case is derived from a bigger one resulting in a problematic wiring when the OSGi Compendium is installed in version 4.3.1 and version 5.0.0 in combination with Felix SCR 1.8.2. In my productive scenario, Felix 4.6.1 wires my bundles to OSGi Compendium:4.3.1 and Felix SCR to OSGi Compendium:5.0.0. In this case Felix SCR gets into trouble during introspection, because (based on that wiring) SCR cannot find the activate method when it has the ComponentContext class in its signature. Both ComponentContext classes are not equal, because they are provided by different classloaders. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Offenbach updated FELIX-4854: -- Description: I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case why we have a different wiring in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} was: I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different version that export the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case why we have a different wiring in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.6.1 Reporter: Jens Offenbach Labels: framework, resolution, wiring Fix For: framework-4.8.0 Attachments: FELIX-4854.zip I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an
[jira] [Updated] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Offenbach updated FELIX-4854: -- Description: I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} The whole use case is derived from a bigger one resulting in a problematic resolution when the OSGi Compendium is installed in version 4.3.1 and version 5.0.0 in combination with Felix SCR 1.8.2. In my productive scenario, Felix 4.6.1 wires my bundles to OSGi Compendium:4.3.1 and Felix SCR to OSGi Compendium:5.0.0. In this case Felix SCR gets into trouble during introspection, because based on that wiring it is impossible to find the activate method when it has the ComponentContext class in its signature. was: I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox
[jira] [Updated] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Offenbach updated FELIX-4854: -- Description: I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} The whole use case is derived from a bigger one resulting in a problematic resolution when the OSGi Compendium is installed in version 4.3.1 and version 5.0.0 in combination with Felix SCR 1.8.2. In my productive scenario, Felix 4.6.1 wires my bundles to OSGi Compendium:4.3.1 and Felix SCR to OSGi Compendium:5.0.0. In this case Felix SCR gets into trouble during introspection, because (based on that wiring) SCR cannot find the activate method when it has the ComponentContext class in its signature. was: I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox
[jira] [Updated] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Offenbach updated FELIX-4854: -- Description: I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} was: I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case why we have a different wiring in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components:
[jira] [Created] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
Jens Offenbach created FELIX-4854: - Summary: Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.6.1 Reporter: Jens Offenbach Fix For: framework-4.8.0 I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different version that export the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case why we have a different wiring in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Offenbach updated FELIX-4854: -- Description: I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} The whole use case is derived from a bigger one resulting in a problematic resolution when the OSGi Compendium is installed in version 4.3.1 and version 5.0.0 in combination with Felix SCR 1.8.2. In my productive scenario, Felix 4.6.1 wires my bundles to OSGi Compendium:4.3.1 and Felix SCR to OSGi Compendium:5.0.0. In this case Felix SCR gets into trouble during introspection when it tries to find e.g. the activate method when it has the ComponentContext class in its signature. was: I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The
[jira] [Created] (FELIX-4855) ConfigAdmin does not update ManagedServiceFactory on framework restart
Christian Schneider created FELIX-4855: -- Summary: ConfigAdmin does not update ManagedServiceFactory on framework restart Key: FELIX-4855 URL: https://issues.apache.org/jira/browse/FELIX-4855 Project: Felix Issue Type: Bug Components: Configuration Admin Affects Versions: configadmin-1.8.2 Reporter: Christian Schneider Fix For: configadmin-1.8.4 Details are described in the linked karaf issue. I found how to fix this and will attach a patch. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (FELIX-4855) ConfigAdmin does not update ManagedServiceFactory on framework restart
[ https://issues.apache.org/jira/browse/FELIX-4855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Schneider updated FELIX-4855: --- Attachment: FELIX-4855-1.patch ConfigAdmin does not update ManagedServiceFactory on framework restart -- Key: FELIX-4855 URL: https://issues.apache.org/jira/browse/FELIX-4855 Project: Felix Issue Type: Bug Components: Configuration Admin Affects Versions: configadmin-1.8.2 Reporter: Christian Schneider Fix For: configadmin-1.8.4 Attachments: FELIX-4855-1.patch Details are described in the linked karaf issue. I found how to fix this and will attach a patch. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (FELIX-4855) ConfigAdmin does not update ManagedServiceFactory on framework restart
[ https://issues.apache.org/jira/browse/FELIX-4855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Schneider updated FELIX-4855: --- Attachment: (was: FELIX-4848-1.patch) ConfigAdmin does not update ManagedServiceFactory on framework restart -- Key: FELIX-4855 URL: https://issues.apache.org/jira/browse/FELIX-4855 Project: Felix Issue Type: Bug Components: Configuration Admin Affects Versions: configadmin-1.8.2 Reporter: Christian Schneider Fix For: configadmin-1.8.4 Attachments: FELIX-4855-1.patch Details are described in the linked karaf issue. I found how to fix this and will attach a patch. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14498002#comment-14498002 ] Richard S. Hall commented on FELIX-4854: I would guess it is due to the fact that Equinox uses a big bang approach to resolving bundles where it resolves all unresolved bundles every time it resolves any, while the Felix framework uses an incremental approach where it only resolves the bundles necessary to satisfy the required dependencies (e.g., of a bundle that is being started or from which a class is being loaded). This can definitely lead to different wiring results and is within the spec. You might be able to test this out if in Gogo you try to resolve all of your bundles at once, e.g., resolve 1 2 3 4 5...I am pretty sure that causes more recent Felix frameworks to resolve them in a single pass (old frameworks [ 4.0.0] still did it incrementally in this case). If that's not the issue, then I'm not sure off the top of my head. Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.6.1 Reporter: Jens Offenbach Priority: Critical Labels: framework, resolution, wiring Fix For: framework-4.8.0 Attachments: FELIX-4854.zip I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} The use case is derived from a bigger one resulting in a problematic wiring when the OSGi Compendium is installed in version 4.3.1 and version 5.0.0 in combination with Felix SCR 1.8.2. In my productive scenario, Felix 4.6.1 wires my bundles to OSGi Compendium:4.3.1 and Felix SCR to OSGi Compendium:5.0.0. In this case Felix SCR gets into trouble during introspection, because (based on that wiring) SCR cannot find the activate method when it has the ComponentContext class in its signature. Both ComponentContext classes are not equal, because they are provided by different classloaders.
[jira] [Commented] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14498030#comment-14498030 ] Christoph Läubrich commented on FELIX-4854: --- About the compendium [~rickhall] can you explain why? @[~herr-herner]: I think this all depends on your bundle manifest / overall setup. IMO your bundle should provide proper version range and use clauses for the spec you allow. {quote}To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense?{quote}IMO such a setup is always problematic but I would agree with your assumption that both bundles are now wired to different bundles. If you want to align you have to refresh packages. And it will be no problem in most cases. The problem only occurs if you receive 'annonymous' objects witout proper import/use clause. Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.6.1 Reporter: Jens Offenbach Priority: Critical Labels: framework, resolution, wiring Fix For: framework-4.8.0 Attachments: FELIX-4854.zip I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} The use case is derived from a bigger one resulting in a problematic wiring when the OSGi Compendium is installed in version 4.3.1 and version 5.0.0 in combination with Felix SCR 1.8.2. In my productive scenario, Felix 4.6.1 wires my bundles to OSGi Compendium:4.3.1 and Felix SCR to OSGi Compendium:5.0.0. In this case Felix SCR gets into trouble during introspection, because (based on that wiring) SCR cannot find the activate method when it has the ComponentContext class in its signature. Both ComponentContext classes are not equal, because they are provided by different classloaders. -- This message was
[jira] [Commented] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14498003#comment-14498003 ] Richard S. Hall commented on FELIX-4854: One other thing, not that this is or isn't part of your difficulty, but we recommend pretty much never installing the compendium as a bundle. Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.6.1 Reporter: Jens Offenbach Priority: Critical Labels: framework, resolution, wiring Fix For: framework-4.8.0 Attachments: FELIX-4854.zip I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} The use case is derived from a bigger one resulting in a problematic wiring when the OSGi Compendium is installed in version 4.3.1 and version 5.0.0 in combination with Felix SCR 1.8.2. In my productive scenario, Felix 4.6.1 wires my bundles to OSGi Compendium:4.3.1 and Felix SCR to OSGi Compendium:5.0.0. In this case Felix SCR gets into trouble during introspection, because (based on that wiring) SCR cannot find the activate method when it has the ComponentContext class in its signature. Both ComponentContext classes are not equal, because they are provided by different classloaders. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FELIX-4855) ConfigAdmin does not update ManagedServiceFactory on framework restart
[ https://issues.apache.org/jira/browse/FELIX-4855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14498038#comment-14498038 ] Guillaume Nodet commented on FELIX-4855: I think the patch is not correct. The problem comes from the fact that the internal cache does not contain factories configuration which are discarded when the full load is done. The patch at https://gist.github.com/gnodet/b8da87a1cdc9e5610f53 should provide a better fix while still retaining the fix for FELIX-4566 ConfigAdmin does not update ManagedServiceFactory on framework restart -- Key: FELIX-4855 URL: https://issues.apache.org/jira/browse/FELIX-4855 Project: Felix Issue Type: Bug Components: Configuration Admin Affects Versions: configadmin-1.8.2 Reporter: Christian Schneider Fix For: configadmin-1.8.4 Attachments: FELIX-4855-1.patch Details are described in the linked karaf issue. I found how to fix this and will attach a patch. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14498119#comment-14498119 ] Jens Offenbach commented on FELIX-4854: --- But why is the wiring result different in {{testWiringA()}} and {{testWiringB()}}? If it is incremental, I suspect the same result in both runs. Close to the specification, the result of {{testWiringB()}} should be equal to the result of {{testWiringA()}}. Do I get something wrong? I will check if it is possible not to rely on the Compendium bundle in my productive environment. Actually, the problem appeared in my Pax Exam tests, so it is difficult to interfere. My tests actually fail in such an environment, but we have solved the issue. Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.6.1 Reporter: Jens Offenbach Priority: Critical Labels: framework, resolution, wiring Fix For: framework-4.8.0 Attachments: FELIX-4854.zip I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} The use case is derived from a bigger one resulting in a problematic wiring when the OSGi Compendium is installed in version 4.3.1 and version 5.0.0 in combination with Felix SCR 1.8.2. In my productive scenario, Felix 4.6.1 wires my bundles to OSGi Compendium:4.3.1 and Felix SCR to OSGi Compendium:5.0.0. In this case Felix SCR gets into trouble during introspection, because (based on that wiring) SCR cannot find the activate method when it has the ComponentContext class in its signature. Both ComponentContext classes are not equal, because they are provided by different classloaders. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14498224#comment-14498224 ] Richard S. Hall commented on FELIX-4854: Are you confusing bundle version with package version? A higher bundle version doesn't really come into play at least as far as the spec is concerned, it is talking about the version of the package, which is the same for both exporters in this case. The next tie-breaker is the bundle ID. Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.6.1 Reporter: Jens Offenbach Priority: Critical Labels: framework, resolution, wiring Fix For: framework-4.8.0 Attachments: FELIX-4854.zip I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} The use case is derived from a bigger one resulting in a problematic wiring when the OSGi Compendium is installed in version 4.3.1 and version 5.0.0 in combination with Felix SCR 1.8.2. In my productive scenario, Felix 4.6.1 wires my bundles to OSGi Compendium:4.3.1 and Felix SCR to OSGi Compendium:5.0.0. In this case Felix SCR gets into trouble during introspection, because (based on that wiring) SCR cannot find the activate method when it has the ComponentContext class in its signature. Both ComponentContext classes are not equal, because they are provided by different classloaders. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (FELIX-4855) ConfigAdmin does not update ManagedServiceFactory on framework restart
[ https://issues.apache.org/jira/browse/FELIX-4855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet resolved FELIX-4855. Resolution: Fixed Assignee: Guillaume Nodet https://svn.apache.org/viewvc?view=revisionrevision=1674069 ConfigAdmin does not update ManagedServiceFactory on framework restart -- Key: FELIX-4855 URL: https://issues.apache.org/jira/browse/FELIX-4855 Project: Felix Issue Type: Bug Components: Configuration Admin Affects Versions: configadmin-1.8.2 Reporter: Christian Schneider Assignee: Guillaume Nodet Fix For: configadmin-1.8.4 Attachments: FELIX-4855-1.patch Details are described in the linked karaf issue. I found how to fix this and will attach a patch. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FELIX-4854) Unable to create consistent wiring when same package is exported in same version by multiple bundles
[ https://issues.apache.org/jira/browse/FELIX-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14498077#comment-14498077 ] Richard S. Hall commented on FELIX-4854: Regarding not using compendium as a bundle, because it is not a cohesive module, it is just a bunch of semi-unrelated crap thrown into a JAR file because the spec needed a container into which to put its definitions. The result is that its dependencies can pull in stuff you don't need and lead to resolution issues. Unable to create consistent wiring when same package is exported in same version by multiple bundles Key: FELIX-4854 URL: https://issues.apache.org/jira/browse/FELIX-4854 Project: Felix Issue Type: Bug Components: Framework Affects Versions: framework-4.6.1 Reporter: Jens Offenbach Priority: Critical Labels: framework, resolution, wiring Fix For: framework-4.8.0 Attachments: FELIX-4854.zip I am confronted with a strange wiring problem in Felix. Actually I am not sure if this is a problem in the Felix or Equinox framework. The attached test case shows that there is a differen behaviour in the wiring process between Felix 4.6.1 and Equinox 3.10.2.v20150203-1939 when we have different bundles with different versions exporting the same package in the same version: The OSGi specification says: The following list defines the preferences, if multiple choices are possible, in order of decreasing priority: • A resolved exporter must be preferred over an unresolved exporter. • An exporter with a higher version is preferred over an exporter with a lower version. • An exporter with a lower bundle ID is preferred over a bundle with a higher ID. Let us assume that we have BundleA:1.0.0 and BundleB:2.0.0 both exporting the same package in the same version and we have SampleA and SampleB importing the package. BundleA gets installed and started, then SampleA. I think SampleA gets wired to BundleA:1.0.0. Now BundleB:2.0.0 gets installed and started, followed by SampleB. To which bundle must SampleB be wired? Strict to the OSGi specification, I would say to BundleB:2.0.0, because it has a higher version than BundleA because BundleA and BundleB are both resolved. But does it make sense? I think BundleA:1.0.0 should be preferred because it is already an active part of the resolution process, but I cannot find anything in the specification. Can someone please explain me, what is going on in the attached use case. Why do we get a different wiring result in Felix 4.6.1 and Equinox 3.10.2.v20150203-1939. The attached demo use case can be executed via: {code} mvn clean install -Pfelix mvn clean install -Pequinox {code} Felix 4.6.1: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} Equinox 3.10.2.v20150203-1939: {code} testWiringA() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleB:2.0.0 testWiringB() org.apache.felix.osgi.r6.wiring.sampleA uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 org.apache.felix.osgi.r6.wiring.sampleB uses org.apache.felix.osgi.r6.wiring.bundleA:1.0.0 {code} The use case is derived from a bigger one resulting in a problematic wiring when the OSGi Compendium is installed in version 4.3.1 and version 5.0.0 in combination with Felix SCR 1.8.2. In my productive scenario, Felix 4.6.1 wires my bundles to OSGi Compendium:4.3.1 and Felix SCR to OSGi Compendium:5.0.0. In this case Felix SCR gets into trouble during introspection, because (based on that wiring) SCR cannot find the activate method when it has the ComponentContext class in its signature. Both ComponentContext classes are not equal, because they are provided by different classloaders. -- This message was sent by Atlassian JIRA (v6.3.4#6332)