Skip to main content
Jump to: navigation, search

Where Is My Bundle

Revision as of 15:06, 4 November 2010 by (Talk | contribs) (Added section on p2 for later versions of Eclipse.)

Sometimes when you start Eclipse, you don't see your bundle and you wonder why. This page will provide a short description of steps that you can take to debug this problem.

Steps To Get More Information

  • Get a console. You will need to run Eclipse with java.exe instead of javaw.exe. If you are using Eclipse 3.3 or later, then use eclipsec.exe. The goal here is to get a DOS console. You can update your eclipse.ini file to include the -vm argument and point to java.exe. Note that whitespace is important in the eclipse.ini file so don't add extra whitespace to the ends of lines.
  • Get the OSGi console. Run with the -console and -noexit command-line parameters. Again, it is probably easiest for you to add them to your eclipse.ini file. I always like to add -consoleLog for good measure. This basically means "anything you print to the log file, also print to the console".
  • Start Eclipse. When you start Eclipse now, you should get a DOS console.
  • Modify console buffer. Change the properties of the DOS console to show a lot of lines, we're going to have a lot of output here and we don't want things cut off.
  • Get the system status. Now you should have a console with a >osgi prompt. Here you can type ss to get the status of all the bundles. You can also use a portion of a Bundle-SymbolicName with the ss command. For example, ss org.eclipse.core will get all bundles with a Bundle-SymbolicName starting with org.eclipse.core.
  • Look for your bundle. Is your bundle in this list? If not, then OSGi doesn't know about it.
  • Get the bundle status. Note the number on the far left column... this is the unique id that OSGi has assigned to your bundle. Write this down, you'll need it later. Also note what state your bundle is in. It should be one of INSTALLED, RESOLVED, ACTIVE, or <<lazy>>.
  • Get more bundle information. If you type bundle 123 (where 123 is the bundle id for your bundle), then you will get lots of information about your bundle including which other bundles it is wired to because of its dependencies. You can also use the Bundle-SymbolicName, for example, if you type bundle (where is the bundle symbolic name for your bundle), then you will get the same information.

Bundle States

  • Not in the list - If your bundle isn't in the list, then OSGi doesn't know anything about it. See the next section for debugging this problem.
  • INSTALLED - This means that OSGi knows about your bundle but there is something wrong and it couldn't resolve. Problems may include thing from missing dependencies to requiring a higher Java VM version than you are running with. To get more information on why your bundle is not resolved try running the diag <bundle id> command, where <bundle id> is your bundle id or bundle symbolic name.
  • RESOLVED - If your bundle is resolved but you expected it to be started, then try starting your bundle from the command-line with the start 123 command. If it won't start, then you should get some feedback as to what the problem is.
  • <<lazy>> - This means your bundle is resolved and is marked to be lazy started. Everything should be ok.
  • ACTIVE - your bundle is resolved and has been started, everything should be working as planned.

OSGi Can't See My Bundle

If your bundle isn't in the list when you do an ss command on the OSGi console, then there are a couple of steps to take to diagnose the problem.

=Eclipse v3.4 and later: p2

Eclipse 3.4 and later use a new update mechanism called [[1]]. p2 is the replacement for the older Update Manager. The plugins and features directories are now managed exclusively by p2, and humans should never add, remove, or modify any of the contents in these directories. p2 does support simple unzipping installations through the [[2]] directory. Note that this directory is only checked on startup.

See [help] for high-level details about using the p2 UI within the Eclipse workbench. p2 also provides support for publishing, installing, updating, and removing software through the [publisher] and [director].

Eclipse v3.3 and Earlier: OSGi - config.ini

Note: these instructions are for Eclipse 3.3 and earlier: those versions which are managed by the Classic Update Manager.

In your Eclipse configuration area (by default a configuration/ folder in the install directory) there is a file called config.ini. This is a Java properties file which contains properties which are read by OSGi on startup. The important one for you right now is the osgi.bundles property. This property lists the bundles that OSGi will see on startup and also sets their start level and tells OSGi whether or not to start them right away. By default, Eclipse will have 3 bundles on the list.


The org.eclipse.equinox.common bundle contains utilities and common classes used by other bundles.

The org.eclipse.core.runtime bundle contains the application extension point and will help OSGi figure out which application to run. (for instance, the Eclipse SDK)

The org.eclipse.update.configurator bundle actually does the work in discovering what other bundles you have, so we don't have to list everything on this list.

You should have at least these 3 bundles in your list.

Update - platform.xml

In your Eclipse configuration directory in the org.eclipse.update folder, there should be a file named platform.xml. This is the file that the Update Configurator uses to determine the rest of the bundles that are known to your system.

The file is organized into sites. You should see a site with the location of platform:/base/ which basically means "everything from the plugins/ folder in my Eclipse install directory". If you have created application extension locations via the update manager UI or if you have a links/ folder then you will have a site entry for each one you have created.

If your bundle exists in an enabled site that is in the platform.xml file, then everything should be ok. Note that the sites can list either features or plug-ins so you may need to know which feature your plug-in belongs to, in order to figure out if it should be known.

Back to the top