views:

27

answers:

3

I've added a plugin to the target platform of my RAP application. I can reference it without issue without any problems while working on the project, and the compile happens without errors. The plugin also shows up in the plugin dependiencies library of my build path. However, when I run the application, the osgi framework gives me the exceptionA

org.osgi.framework.BundleException: The bundle "ate_rap_1.0.0.qualifier [98]" could not
be resolved. Reason: Missing Constraint: Require-Bundle: com.richclientgui.rcptoolbox;
bundle-version="0.0.0"

How do I add a plugin so that I can use it with my application?

A: 

Is your application built from a PDE feature? If so you may need to add the new plugin to the list of plugins included in your main feature.

ChrisH
Unfortunately, the application is a pretty straightforward RAP application, built from the RAP with View template.
Zoe Gagnon
A: 

To add a plugin to a basic RAP application, select File->New->Other and in the wizard, select Plug-in Development->Plug-in from Existing Jar Archives. This will create a project hosting that plugin which may be added to the build path. After adding to the build path, add this plugin as a dependencies in your MANIFEST.MF. Finally, in the run configuration for the application, select the Bundles tab and make sure the bundle you want to add is checked. This is easily done with the "Add Required Bundles" button. Now the project should run in Eclipse with the bundle.

Zoe Gagnon
A: 

First of all, do not use plugin dependencies when you work with OSGi. OSGi doesn't know about your those dependencies in your IDE, it only cares for the dependencies that a bundle defines in its bundle manifest. Therefore, you have to define a dependency in the MANIFEST.MF (Dependencies tab) instead.

Second, you have to add this bundle to your launch configuration. In Eclipse, go Run... -> Run Configurations... Select your launch config, go to the Bundles tab and check your additional plug-in. Before you launch, click on "Validate Bundles" in the Bundles tab.

ralfstx