Thursday, September 2, 2010

Eclipse plugin/OSGI err: Validation failed : Missing constraint - Import-Package: x.y.z; version=".."

You might encounter this while dealing with eclipse plugins in eclipse EDE.
For sample while launching as Eclipse Application or Junit Plug-in test.

This is because of validation (automatically trigged) upon launch.
a. Goto Run/Debug Configuration -> Eclipse Application (say) -> your configuration name
b. In the right side you will see many tabs named Main, Arguments, Plug-ins etc.
Select Plug-ins
c. At the bottom you will see item 'Validate plug-ins automatically prior to launching' checked.
d. Though un checking it might resolve the problem temporarily (at launch) its not a real solution
e. To resolve it, click 'Add Required Plugins' at the right. It will automatically add required bundles if available. Now manually do 'Validate Plug-ins' and validation will pass.

1 comment:

  1. Unfortunately this usually does not work.
    It is often absolutely unclear why the mentioned package / bundle is not visible to the started software at launch time. And the message itself is not helpful in the end - it just tell something is wron with this package.
    What exactly it is it does not tell.
    Fortunate You if adding the plugin helps - for me this never worked. (The plugin was always already present)