Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » No automatic bundle activation
No automatic bundle activation [message #546796] Wed, 14 July 2010 09:03 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
Previous Topic:HttpContext outside of plugin bundle
Next Topic:Crash p2-updater on OS X
Goto Forum:
  


Current Time: Fri Apr 26 22:14:52 GMT 2024

Powered by FUDForum. Page generated in 0.03117 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top