Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting OSGi bundle

I try to run OSGi plug in in Eclipse. It is empty bundle, but eclipse always send me errors There are my console messages http://pastebin.com/dqQfpQhd What is wrong?

like image 424
EK. Avatar asked Aug 10 '10 09:08

EK.


People also ask

How do I run OSGi bundle?

Procedure. Install the plug-in bundle into the Eclipse Equinox OSGi framework with the OSGi console. Start the Eclipse Equinox framework with the console enabled. Install the plug-in bundle in the Equinox console.

What is OSGi start level?

A start level is simply a non-negative integer value. The Framework has an ‚active start level' that is used to decide which bundles can be started. Bundles themselves have an associated ‚bundle start level' which is used to determine when a bundle is started.

What is an OSGi bundle?

In OSGi, a single component is called a bundle. Logically, a bundle is a piece of functionality that has an independent lifecycle – which means it can be started, stopped and removed independently. Technically, a bundle is just a jar file with a MANIFEST. MF file containing some OSGi-specific headers.


1 Answers

The problem is that the default target includes many bundles that have nothing to do with your bundle -- typing the command ss when all the error messages have finished will list them.

Here's what you do:

  1. In Eclipse, go to Preferences > Plug-in Development > Target Platform
  2. Create a new empty target definition
  3. In the Locations tab, add a directory containing nothing but the Equinox bundle (which you can copy from the plugins directory of your Eclipse installation, the jar is named something like org.eclipse.osgi_3.7.0.v20110613.jar)
  4. Make sure the new target is active and try running your bundle again
like image 200
garamond Avatar answered Nov 15 '22 04:11

garamond