Unsatisfied custom code filter error when trying to export an OSGi fragment to Eclipse using custom vm arg

It seems that there is only one such question here , but the solution proposed in this answer was not effective for me. I am using the Spring Tool Suite (essentially Kepler 4.3.2 SR2) as my IDE to develop an OSGi fragment that contains the latest version of some native C ++ code. Fragments exist to allow the use of different versions of software in different environments with which this native code is intended for integration.

However, I cannot export this fragment, apparently because of the custom vm arg, which we use to represent this version number.

the manifest looks something like this:

Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Windows 64-bit support for Third-Party XYZ 4.12.7 Bundle-SymbolicName: com.ourcompany.oursoftwarepackage.xyz.win64xyz4127 Bundle-Version: 8.6.2.qualifier Bundle-Vendor: OurCompany Fragment-Host: com.ourcompany.oursoftwarepackage.xyz Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86_64)) Bundle-NativeCode: xyzintegration.dll; selection-filter = "(oursoftwarepackage.xyzVersion=4.12.7)" Bundle-ClassPath: . 

The error says:

Inclusion processing from the org.eclipse.pde.container.feature function: convolution com.ourcompany.oursoftwarepackage.xyz.win64xyz4127_8.6.2.qualifier could not be resolved: Poor native code filter: xyzintegration.dll; Filter selection = "(oursoftwarepackage.xyzVersion = 4.12.7)".

If I delete the selection filter clause, it appears for export, but the actual artifact is not produced.

The suggestion that I extrapolated from the link above was to enable vmarg

 -Doursoftwarepackage.xyzVersion=4.12.7 

in the target plug-in development environment. This, however, does not seem to fit the OSGi framework. Now I donโ€™t understand how to get the fragment to allow export.

+6
source share
1 answer

I assume that you are talking about setting up the target environment in the target definition editor. At least this is the only place I know for such a setup. But this is the definition of the goal against which you are developing. It does not indicate runtime.

You need to set the VM parameter in the "Run" configuration.

Run โ†’ Run Configurations ... โ†’ Select the application to run โ†’ Go to the โ€œArgumentsโ€ tab โ†’ paste the value into the โ€œVM Settingsโ€ section

0
source

All Articles