Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » question about class loading
question about class loading [message #124682] Mon, 19 January 2009 13:06 Go to next message
Ittay  is currently offline Ittay Friend
Messages: 15
Registered: July 2009
Junior Member
Hi,

I have this situation:
bundle_a
fragement_1: has classes in package foo.bar and attaches to bundle_a
(using 'Fragment-Host' in the manifest).
bundle_b: also has classes in package foo.bar
bundle_c: lists bundle_b as a required bundle, imports packages in
bundle_a (not foo.bar).

A class in bundle_c tries to create a class foo.bar.Car that is in
bundle_b and can't find it.

Debugging this, I can see that
org.eclipse.osgi.framework.internal.core.BundleLoader#findCl assInternal
calls findRequiredSource with pkgName "foo.bar" and that the
requiredSources cache contains "foo.bar" mapped to bundle_a. so a source
for bundle_a is returned, and it doesn't contain the class.

How can I resolve this?

Thanks,
Ittay
Re: question about class loading [message #124694 is a reply to message #124682] Mon, 19 January 2009 13:12 Go to previous messageGo to next message
Ittay  is currently offline Ittay Friend
Messages: 15
Registered: July 2009
Junior Member
Thought I should explain more:
fragment_1 and bundle_b are both 3rd party jars which I osgified. The
reason that fragment_1 is attached to bundle_a is that code in bundle_b
uses the context class loader which is associated with bundle_a and i need
it to find resources in fragment_1.

bundle_a is also 3rd party.

so in terms of changing code i have very little I can do. I'm looking for
a solution by using manifest file declarations (or maybe it is an equinox
bug that it doesn't detect that there are 2 bundles providing the same
package?)

Ittay
Re: question about class loading [message #125158 is a reply to message #124694] Wed, 28 January 2009 21:04 Go to previous message
Martin Lippert is currently offline Martin LippertFriend
Messages: 124
Registered: July 2009
Senior Member
Hi Ittay,

can you provide a small test case for this?

-Martin



Ittay wrote:
> Thought I should explain more:
> fragment_1 and bundle_b are both 3rd party jars which I osgified. The
> reason that fragment_1 is attached to bundle_a is that code in bundle_b
> uses the context class loader which is associated with bundle_a and i
> need it to find resources in fragment_1.
>
> bundle_a is also 3rd party.
>
> so in terms of changing code i have very little I can do. I'm looking
> for a solution by using manifest file declarations (or maybe it is an
> equinox bug that it doesn't detect that there are 2 bundles providing
> the same package?)
>
> Ittay
>
Previous Topic:[p2] how to get a list of installed features?
Next Topic:Exception with UserAdmin service and getUser
Goto Forum:
  


Current Time: Tue Mar 19 06:42:44 GMT 2024

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

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

Back to the top