2. Overall Search Order
1. java.*, delegates to parent, if parent can not find it, fails
2. if in boot delegation list, delegates to parent
3. if import, delegates to exporting bundle class loader, if not found, fails
4. if Required-Bundle, delegates to the required bundles’ class loaders,
depth-first
5. Bundle-Classpath
6. fragments
7. if DynamicImport-Package, delegates to exporting bundle class loader
8. equinox will try to apply buddy policy
4. ClassNotFoundException
• if defined in Import-Package/Required-Bundle/DynamicImport-
Package
- where is the bundle exporting it
- if no such a bundle exporting it, should we consider
o.o.f.system.packages.extra
• if loading dynamically using for example Class.forName()
- make sure what is the class loader used to load this class
- thread context class loader
- bundle class loader
- have we defined in o.o.f.bootdelegation
- what is the type of o.o.f.bundle.parent: boot, app, ext, or framework
5. References
• of course OSGi specification
• http://codescale.wordpress.com/2009/05/22/
basics-about-osgi-classloading/
• http://www.jfokus.se/jfokus09/slides/salong4/
OSGiClassloading.pdf
• org.eclipse.osgi.internal.loader.BundleLoader
in equinox does most of the tricks
• someone helps me find equivalent in felix?