NoClassDefFoundError is an Error which is unchecked and can be thrown 
anywhere. Given that Bundle.loadClass is patterned after 
ClassLoader.loadClass, one should expect similar results.
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[EMAIL PROTECTED]

office: +1 386 848 1781
mobile: +1 386 848 3788





From:
"Karl Pauls" <[EMAIL PROTECTED]>
To:
[email protected]
Date:
2008/08/11 04:18 PM
Subject:
[osgi-dev] Should Bundle.loadClass throw NoClassDefFoundError



Hi,

I have a question regarding the Bundle.loadClass(String) method. It
throws a ClassNotFoundException if the class can not be found but what
happens if the class depends on something that can not be found. In
the Classloader case that would result in a NoClassDefFoundError but
that is not mentioned in the spec. I think the
Bundle.loadClass(String) method should be allowed to throw a
NoClassDefFoundError in this case and that is what Apache Felix is
doing atm. Is this correct (and should that then be reflected in the
spec)?

regards,

Karl

-- 
Karl Pauls
[EMAIL PROTECTED]
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to