Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » OSGI Bundle use in a view
OSGI Bundle use in a view [message #104964] Mon, 11 February 2008 16:01
Tom is currently offline TomFriend
Messages: 11
Registered: July 2009
Junior Member
I have a bundle com.tcrscorner.ibs.generations.model.jar
which contains an interface save action and registers
a service in it's activator.

In my view plugin i added a reference to an external plugin which is in
fact the bundle:

I have the following code in the Activator of my view:

FileInputStream fis;
fis = new FileInputStream
File(" c:/temp/generations/eclipse/plugins/com.tcrscorner.ibs.gener ations.model.jar "));
Bundle bundle = context.installBundle("GenerationsInterface", fis);

This works fine cause when i execute "services" in the osgi console i get:

Registered by bundle: GenerationsInterface [26]
No bundles using service.

I have the following code behind a button on my view

String target = "com.tcrscorner.ibs.generations.model.SaveAction";
BundleContext context =

Final ServiceTracker saveTrack = new ServiceTracker(context,
SaveAction.class.getName(), null);;
SaveAction saveXML = (SaveAction) saveTrack.getService();
if(saveXML != null) {


It's in this part of the code i get in trouble when exexcuting the code
above i get the following error: java.lang.NoClassDefFoundError:

I tried several things such as adding the import-package statement to
the of the view with the value :

However when running this i get immediately an error:

!MESSAGE Missing imported package

Any idea what the problem could be? How can I fit this all together so
that it works

Tnx in advance for the help !

Previous Topic:Declarative Services - where to get an implementation
Next Topic:OSGI Bundle use in a view
Goto Forum:

Current Time: Mon Nov 30 04:48:10 GMT 2015

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

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