I'm getting a NoClassDefFoundError
at runtime and I thought the "uses"
directive would avoid this because I thought it created transitivity (correct me if I'm wrong).
Here is my configuration:
Bundle 1
Export-package A
Bundle 2
Export-package B, uses "A"
Import-package A
Bundle 3
Import-package B
Now, the exception happens when Bundle 3 makes a call to a class in B which in turn makes a call to a class in A. Based on the console, i can see that the BundleClassLoader
looks for the class in bundle 3 (in other words, in itself), but not in Bundle 1 where it would find it. If i force BND to import A in Bundle 3 everything works fine, but it looks too labor intensive. i feel like I'm missing something. Shouldn't equinox use the info in the manifests to set the bundle classpath? or in the worst case, shouldn't BND detect the dependency of 3 on 1 and import package A in the manifest of 3?
All my bundles are active
and i have no uses
constraint violations