No automatic bundle activation [message #546796] |
Wed, 14 July 2010 09:03 |
Eclipse User |
|
|
|
Originally posted by: hillner.informatik.uni-leipzig.de
Hi,
I'm trying to start up an osgi platform using equinox to run a set of
plugins outside the eclipse ide.
I use the following code to start osgi and install the required bundles:
try {
String[] equinoxArgs = {"-clean", "-noExit", "-configuration",
"C:/equinox-test/configuration"};
BundleContext context = EclipseStarter.startup(equinoxArgs, null);
//start the main bundle which conatins the application logic
for(Bundle b : context.getBundles()) {
if(b.getSymbolicName().equals(bundleName)) {
b.start();
}
}
} catch(Exception e) {
e.printStackTrace();
} finally {
try {
EclipseStarter.shutdown();
} catch(Exception e) {
e.printStackTrace();
}
}
The configuration file:
osgi.bundles=org.eclipse.equinox.common@2:start,
org.eclipse.update.configurator@3:start
eclipse.ignoreApp=true
osgi.noShutdown=true
As you see, I'm using the automated plugin istallation of equinox which
browses the plugin folder.
Unitl this point, there are no failures, but when I try to start the
main bundle, I always get the "Missing Constraint - BundleException"
which says that a required bundle is missing.
The problem is that this bundle is installed correctly but won't be
started automatically by the framework.
My folder structure looks like this:
/configuration/
config.ini
/plugins/
...
org.eclipse.equinox.common.jar
org.eclipse.equinox.osgi.jar
org.eclipse.update.configurator.jar
Does anyone know why the plugins are not started automatically and how
to activate them on demand?
Thanks
|
|
|
Re: No automatic bundle activation [message #546923 is a reply to message #546796] |
Wed, 14 July 2010 15:27 |
Eclipse User |
|
|
|
Originally posted by: hillner.informatik.uni-leipzig.de
Am 7/14/2010 11:03 AM, schrieb Stanley Hillner:
> Hi,
>
> I'm trying to start up an osgi platform using equinox to run a set of
> plugins outside the eclipse ide.
> I use the following code to start osgi and install the required bundles:
>
> try {
> String[] equinoxArgs = {"-clean", "-noExit", "-configuration",
> "C:/equinox-test/configuration"};
> BundleContext context = EclipseStarter.startup(equinoxArgs, null);
>
> //start the main bundle which conatins the application logic
> for(Bundle b : context.getBundles()) {
> if(b.getSymbolicName().equals(bundleName)) {
> b.start();
> }
> }
>
> } catch(Exception e) {
> e.printStackTrace();
> } finally {
> try {
> EclipseStarter.shutdown();
> } catch(Exception e) {
> e.printStackTrace();
> }
> }
>
>
>
> The configuration file:
>
> osgi.bundles=org.eclipse.equinox.common@2:start,
> org.eclipse.update.configurator@3:start
> eclipse.ignoreApp=true
> osgi.noShutdown=true
>
>
>
> As you see, I'm using the automated plugin istallation of equinox which
> browses the plugin folder.
> Unitl this point, there are no failures, but when I try to start the
> main bundle, I always get the "Missing Constraint - BundleException"
> which says that a required bundle is missing.
> The problem is that this bundle is installed correctly but won't be
> started automatically by the framework.
> My folder structure looks like this:
>
> /configuration/
> config.ini
> /plugins/
> ...
> org.eclipse.equinox.common.jar
> org.eclipse.equinox.osgi.jar
> org.eclipse.update.configurator.jar
>
>
> Does anyone know why the plugins are not started automatically and how
> to activate them on demand?
>
> Thanks
Ok,
the problem wasn't a real problem, there were unresolved dependencies
which caused exceptions in some bundle activators.
But it wasn't easy to figure out all dependent plugins correctly with
this number of plugins.
Thanks anyways, if someone took a look at the problem.
|
|
|
Powered by
FUDForum. Page generated in 0.03117 seconds