Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Bundle cant find it's own packages
Bundle cant find it's own packages [message #503548] Mon, 14 December 2009 16:39 Go to next message
Elliot  is currently offline Elliot Friend
Messages: 1
Registered: December 2009
Junior Member
I've got an application that runs in OSGi. I use OSGi to service the plugin system for my application. The application runs fine, but the bundles (plugins) for it are failing to load. They seem to be unable to find their own classes. There are several problems of this type, but here's a trace from a bundle I use to export packages from the mysql connector jar. In the bundle activator, I call


To register the driver. This has worked for me before, but suddenly started giving me the following error when I start the bundle:

Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
	at java.lang.ClassLoader.loadClassInternal(
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(
	at req.activator.Activator.start(
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$
	at Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(
	... 14 more

Yes, this package is in the bundle. I am at a loss as to why OSGi is unable to find it. Has anyone else had similar problems?

Here's a snapshot of the project layout:

Re: Bundle cant find it's own packages [message #503573 is a reply to message #503548] Mon, 14 December 2009 17:58 Go to previous message
Mickael Istria, away until January 8th is currently offline Mickael Istria, away until January 8thFriend
Messages: 828
Registered: July 2009
Location: Grenoble, France
Senior Member


Is MySAL added as an OSGi an OSGi bundle dependency or included into your bundle as a nested jar?
In the second case, did you add it into your MANIFEST.MF as Bundle-Classpath entry (in the runtime tab of Eclipse bundle editor) and also in your


Mickael Istria - BonitaSoft S.A.
Previous Topic:Multi-locale support in extension registry - Why not enabled by default?
Next Topic:Installing feature jars instead of feature folders
Goto Forum:

Current Time: Sun Apr 22 18:46:38 GMT 2018

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

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