On 10/7/10 13:29, Martin Ždila wrote:
I have to assume that this bundle both imports and exports the
org.eclipse.jetty.util.component.jmx class, since there is no wire and no
resolve exception. Is that correct?
Correct.
If so, then it should be able to see the classes in its contained package
since it didn't import it.
I thing the same.
Sounds odd. Is there some way for you to create a reproducible example and
attach it to a JIRA issue?
I will try. For sure I'll simplify the situation I see:
in MANIFEST.MF:
bundle A exports package "package"
bundle B exports packages "package.subpackage" and imports "package",
"package.subpackage"
runtime in the console:
inspect package requirement on bundle B will show only "package"
bundle B uses class from "package.subpackage" and it throws
ClassNotFound exception
I created a similar scenario:
g! install file:tmp/a/a.jar
Bundle ID: 5
g! install file:tmp/b/b.jar
Bundle ID: 6
g! headers 5
Bundle 5
--------
Bundle-ManifestVersion = 2
Bundle-SymbolicName = BundleA
Created-By = 1.6.0_20 (Apple Inc.)
Export-Package = p
Manifest-Version = 1.0
g! headers 6
Bundle 6
--------
Bundle-ManifestVersion = 2
Bundle-SymbolicName = BundleB
Created-By = 1.6.0_20 (Apple Inc.)
Export-Package = p.p
Import-Package = p, p.p
Manifest-Version = 1.0
g! resolve 6
DEBUG: WIRE: [6.0] package; (package=p) -> [5.0]
g! inspect p r 6
BundleB [6] imports packages:
-----------------------------
p; version=0.0.0 -> BundleA [5]
g! ((bundle 6) loadClass p.p.Test) newInstance
In p.p.Test
In p.Hello
p.p.t...@49d67c
g!
You can see I create an instance of a class in the p.p package which
turns around and creates an instance of a class in the p package. This
appears to work, so there is more to it than that apparently.
-> richard
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]