Can't install Eclipse RCP based product with 2019-03 target platform using p2 director due to missing requirement

Viewed 529

I am in the process of upgrading our Eclipse RCP based Data Acquisition product to use the 2019-03 target platform but, having built successfully, the product fails to install with org.eclipse.equinox.p2.director with the following message:

Installation failed. Cannot complete the install because one or more required items could not be found. Software being installed: Data Acquisition Server 9.14.0 (uk.ac.diamond.daq.server.product 9.14.0) Missing requirement: Eclipse Application Services 2.1.400.v20181215-2145 (org.eclipse.e4.core.services 2.1.400.v20181215-2145) requires 'osgi.extender; osgi.component [1.2.0,2.0.0)' but it could not be found Cannot satisfy dependency: From: Eclipse 4 Rich Client Platform 1.6.400.v20190305-0602 (org.eclipse.e4.rcp.feature.group 1.6.400.v20190305-0602) To: org.eclipse.equinox.p2.iu; org.eclipse.e4.core.services [2.1.400.v20181215-2145,2.1.400.v20181215-2145] Cannot satisfy dependency: From: Eclipse Platform 4.11.0.v20190307-0500 (org.eclipse.platform.feature.group 4.11.0.v20190307-0500) To: org.eclipse.equinox.p2.iu; org.eclipse.rcp.feature.group [4.11.0.v20190307-0500,4.11.0.v20190307-0500] Cannot satisfy dependency: From: Eclipse RCP 4.11.0.v20190307-0500 (org.eclipse.rcp.feature.group 4.11.0.v20190307-0500) To: org.eclipse.equinox.p2.iu; org.eclipse.e4.rcp.feature.group [1.6.400.v20190305-0602,1.6.400.v20190305-0602] Cannot satisfy dependency: From: Analysis Server Components Feature 1.0.0.v20190614-0955 (uk.ac.diamond.daq.analysis.server.feature.feature.group 1.0.0.v20190614-0955) To: org.eclipse.equinox.p2.iu; org.eclipse.platform.feature.group [4.11.0.v20190307-0500,4.11.0.v20190307-0500] Cannot satisfy dependency: From: Main Data Acquisition Server Feature 9.14.0.v20190614-0955 (uk.ac.diamond.daq.server.feature.feature.group 9.14.0.v20190614-0955) To: org.eclipse.equinox.p2.iu; uk.ac.diamond.daq.analysis.server.feature.feature.group [1.0.0.v20190614-0955,1.0.0.v20190614-0955] Cannot satisfy dependency: From: Data Acquisition Server 9.14.0 (uk.ac.diamond.daq.server.product 9.14.0) To: org.eclipse.equinox.p2.iu; uk.ac.diamond.daq.server.feature.feature.group [9.14.0.v20190614-0955,9.14.0.v20190614-0955]

This indicates that the osgi.component extension required by the e4.core.services plugin cannot be found. Having looked online I've found that this requirement should be provided by the org.apache.felix.scr plugin which is present in my target platform and according to its Manifest file provides the requirement at version 1.4.0 which is within the required range specified in the error (1.2.0 - 2.0.0). I've also confirmed that this plugin is present in the repository folder specified in the command that launches org.eclipse.equinox.p2.director which is as follows:

./eclipse -application org.eclipse.equinox.p2.director -repository file:/tmp/uk.ac.diamond.daq.server.site_20190618_144254.420236/output/uk.ac.diamond.daq.server.site_1.0.0-eclipse.feature/site.p2/ -installIU uk.ac.diamond.daq.server.product -destination /scratch/tptest2/servers/server_20190618-1446_linux64 -profile GDA-server -profileProperties org.eclipse.update.install.features=true -p2.os linux -p2.ws gtk -p2.arch x86_64 -roaming

Can anyone advise what is amiss here? Given that the org.eclipse.e4.core.services and org.apache.felix.scr plugins which are the two ends of this requirement are present and provided as part of the 2019-03 target platform, I was surprised when this came up. Is there some other dependency that I'm unaware of that could be causing the resolution to fail or is there some component that is no longer present in this TP which I need to account for. Our previous (working) TP is the Oxygen3 version in which the version of felix provides V1.3 of osgi.component.

I should also say that when I generate a launcher within Eclipse from the same product definition, the process is successful and the application runs correctly.

#UPDATE

I tried out @PeterKirschner's jar but it didn't fix the issue, however what it did do is point me in the direction of which bit of the p2 system is involved i.e. the content.xml/jar. I looked at the transformed version and it hadn't made any changes to the felix.scr unit, but it was obvious that there was no provides tag covering osgi,extender and osgi.component in there anyway, but there are plenty of requires tags requesting it. I checked in the manifest of the version of felix scr in the TP and it has a Provides-Capabiliy entry referencing the extender at an acceptable version so I was bit confused why it seemed to have been ignored. Here is the relevant bit of the manifest:

Provide-Capability: osgi.extender;osgi.extender="osgi.component";uses:
 ="org.osgi.service.component";version:Version="1.4",osgi.service;obje
 ctClass:List<String>="org.osgi.service.component.runtime.ServiceCompo
 nentRuntime";uses:="org.osgi.service.component.runtime"
Originally-Created-By: Apache Maven Bundle Plugin
Export-Package: org.apache.felix.scr.component;version="1.1.0";uses:="
 org.osgi.service.component",org.apache.felix.scr.info;version="1.0.0"
Bundle-Name: %bundleName

So to see what would happen, I tried adding the appropriate provides tag to the felix.scr unit and re ran the p2.director which resulted in the application being successfully installed! I tested it and it seems to run normally once I had run the normal automated post install steps from our process.

So it doesn't seem to be the presence of oxygen3 related tags that are causing the problem, just that the bundle's advertised capability is not making it into the context.xml file. @PeterKirschner do you have any idea why this might be? Oh and once again thank you for your help

0 Answers
Related