felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John E. Conlon" <jcon...@verticon.com>
Subject Re: Fixed bug in class loading
Date Thu, 06 Apr 2006 22:22:24 GMT
Hello Richard,

As you mentioned after the change I had to edit my bundle Import-Package
headers to get bundles to resolve without NoClassDefFoundErrors. 
Now the tough part about this was that I had to not only import all the
javax classes I was using but also the sun, and even the com.sun
packages in the imports as well.  Then I had to add the various
javax.xxx, sun.xxx and com.sun.xxx packages to the config.properties
file's org.osgi.framework.system.packages property as well.

Now I must confess that reading the classloading part of the OSGi spec
makes my eyes glaze over, but I did notice section 3.8.3 discussion of
parent delegation. It talks about a bootdelegation property that can add
packages to the parent classloader like this:

property org.osgi.framework.bootdelegation=sun.*,com.sun.*

Maybe I am paranoid but I feel uncomfortable doing anything (even
declaring imports in bundles) with the sun and com.sun packages. Could
the bootdelegation property eventually come to the rescue?

cheers,
John

On Wed, 2006-04-05 at 04:54 -0400, Richard S. Hall wrote:
> Hello everyone,
> 
> I just wanted to let you know that I discovered and fixed a bug in Felix 
> class loading that was accidentally exposing classes on the class path 
> to bundles, even if they did not import them.
> 
> This bug was introduced during the module layer refactoring.
> 
> I am posting a message about this to let people know that they should 
> "svn update" and after they do, they might experience 
> NoClassDefFoundErrors and the like if their bundles' manifests are 
> incomplete. If you run into this situation, most likely, you just need 
> to add the package to the Import-Package header of the bundle.
> 
> -> richard
> 


Mime
View raw message