Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316955 - Unable to load/run fragment class from host bundle
Summary: Unable to load/run fragment class from host bundle
Status: CLOSED INVALID
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-15 14:11 EDT by Dmytro Pishchukhin CLA
Modified: 2010-06-16 01:08 EDT (History)
0 users

See Also:


Attachments
test sources (10.88 KB, application/octect-stream)
2010-06-15 14:12 EDT, Dmytro Pishchukhin CLA
no flags Details
test to reproduce the issue (1.01 MB, application/octect-stream)
2010-06-15 14:12 EDT, Dmytro Pishchukhin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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