[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] class not found in the same package
- From: Mayank Thakore <thakore.mayank@xxxxxxxxx>
- Date: Sun, 30 Sep 2007 19:06:11 +0530
- Delivered-to: email@example.com
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=AYTTrfQUCeGKCon4ousdenAr4+bFvMUeBASGElfbrqh5haEhR7B7ViWksuzz+u3ysgvS7yWxTWE27eNgoSnrslb88tXvY8O+yB6t9wE3AjFpS9bhs/Jo5VsPRHx7Vvo+h0O//dSZj+mr2ZHTs+7PyY8E5pO8ch8GcW6RoN2CkX0=
- User-agent: Thunderbird 188.8.131.52 (X11/20070423)
i put all the classes in one bundle and exported from there. then it worked.
i will try this tool. we will need it soon i think
Niclas Hedhman wrote:
On Sunday 30 September 2007 15:40, Mayank Thakore wrote:
I am running standard, osgi framework bundles from inside eclipse 3.2.0.
I get a class not found exception java.lang.NoClassDefFoundError
However the package is already imported. There are two classes in the
package. One of them I am able to access but not the other ! (the
exporting bundle has the package inside a jar file in its classpath).
When I removed the import both classes are inaccessible. But if I
introduce the import only one of the classes becomes accessible. I have
ensured that only one bundle is exporting the package.
I'm stuck with this for a few hours now and don't know how to go around
looking for a solution. Any help is appreciated.
It happens occassionally that the wrong class is reported with a
NoClassDefError. This is not a Equinox/OSGi bug, but an issue in the JVM.
In the class reported having a problem, start looking for classes that it
references indirectly via
- super class
- method arguments and return types
And stuff those in turn are referencing in the same manner.
I also suggest that you run Peter Kriens' BND tool on your bundle, which will
pin-point the problems for you. See http://www.aqute.biz/Code/Bnd
If you use Maven, then BND is built into the Maven Bundle Plugin, which is
available from Apache Felix project.