Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316955

Summary: Unable to load/run fragment class from host bundle
Product: [Eclipse Project] Equinox Reporter: Dmytro Pishchukhin <dmytro.pishchukhin>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
test sources
none
test to reproduce the issue none

Description Dmytro Pishchukhin CLA 2010-06-15 14:11:36 EDT
Build Identifier: 3.6.R4 and older

There is very strange behavior when I try to load and run class that is placed in fragment bundle from host bundle. (This is simplified behavior, that is implemented in Jetty osgi.boot and osgi.boot.jsp bundles).

1. Host bundle imports org.xml.sax package
2. in the host bundle activator class from fragment bundle is loaded. The class implements BundleActivator interface
3. calls start#BundleContext method of loaded class where org.xml.sax.SAXException is thrown.
4. gets ClassNotFoundException in fragment class.

Questions: 
1. why is not host class loader used in this case?
2. why does it work inside Eclipse (Jetty SDK)?

Thank you.

Reproducible: Always

Steps to Reproduce:
sources and test framework in the attachment
Comment 1 Dmytro Pishchukhin CLA 2010-06-15 14:12:02 EDT
Created attachment 171973 [details]
test sources
Comment 2 Dmytro Pishchukhin CLA 2010-06-15 14:12:40 EDT
Created attachment 171974 [details]
test to reproduce the issue
Comment 3 Dmytro Pishchukhin CLA 2010-06-16 01:08:51 EDT
found a problem