Skip to main content

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 Cx is currently offline Tom CxFriend
Messages: 13
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: Wed Oct 20 11:27:12 GMT 2021

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

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

Back to the top