views:

327

answers:

1

Context of this problem: OSGi and Eclipse Platform.

I've got bundle (plugin) which is host for some fragment. Fragment is running only when I start it through Eclipse "run configuration" (I add it in plugin dependencies in run configuration of plugin), but when I am trying to export it either through eclipse or through maven tycho project then fragment is not working. In osgi's console I've not found any conflicts (osgi command diag ) and fragment is in "RESOLVED" state which afaik means it's ok and it's started. Breakpoint in fragment in method IStartup#earlyStartup() (which is afaik entry point to fragment) is not activated, no error shown in osgi's console...nothing...

Any clue? Am I missing something?

A: 

The hosting bundle should show as ACTIVE and the fragment should be RESOLVED (fragments can never be ACTIVE) in the OSGi console.

The OSGi console output should also show the bundle IDs for any fragments on a bundle and say which bundle host a fragment sits on top of it.

Try stopping and starting the host bundle from the console. Many times start-up problems are hidden and you only see them on a stop-and-restart.

You don't say how you are exporting your application outside of Eclipse. This is an area that is poorly documented (in my opinion). If you are using the Eclipse runtime to run the application, you'll need to research how to use the config.ini file to control bundle activation. See here for more.

hbunny