[jboss-user] [JBoss Microcontainer Development] - Cannot load package from deployment that has dynamic imports
Thomas Diesler
do-not-reply at jboss.com
Tue May 4 06:38:25 EDT 2010
Thomas Diesler [http://community.jboss.org/people/thomas.diesler%40jboss.com] created the discussion
"Cannot load package from deployment that has dynamic imports"
To view the discussion, visit: http://community.jboss.org/message/541003#541003
--------------------------------------------------------------
The symptom is that we see WARN messages like this
09:04:13,595 WARN [BaseDelegateLoader] Not getting package org.osgi.service.log from policy that has no classLoader: LazyFilteredDelegateLoader at a75737{factory=org.jboss.classloading.spi.dependency.policy.DynamicClassLoaderPolicyFactory at 4f0853 filter=<EVERYTHING>}
09:04:13,599 WARN [BaseDelegateLoader] Not getting package org.osgi.service.log from policy that has no classLoader: LazyFilteredDelegateLoader at a75737{factory=org.jboss.classloading.spi.dependency.policy.DynamicClassLoaderPolicyFactory at 4f0853 filter=<EVERYTHING>}
09:04:13,727 WARN [BaseDelegateLoader] Not getting package org.osgi.util.tracker from policy that has no classLoader: LazyFilteredDelegateLoader at a75737{factory=org.jboss.classloading.spi.dependency.policy.DynamicClassLoaderPolicyFactory at 4f0853 filter=<EVERYTHING>
The reason seems that the http://fisheye.jboss.org/browse/JBossAS/projects/jboss-cl/tags/2.2.0.Alpha4/classloader/src/main/java/org/jboss/classloader/spi/base/BaseClassLoaderDomain.java?r=102335 BaseClassLoaderDomain uses this sematics in getPackage
1. // Try the before attempt
2. // Next we try the old "big ball of mud" model
3. // Next we try the imports
4. // Finally use any requesting classloader
5. // Try the after attempt
In step #3 the imports also include the dynamic imports (even the EVERYTHING aka '*' imports)
The LazyFilteredDelegateLoader has no classloader associated and getPackage fails.
In OSGi dynamic imports are considered *after* the bundles embedded classpath.
I suggest we split getPackageFromImports in two variants and consider dynamic import between step #4 and #5
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/541003#541003]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2115]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100504/2c1dbd93/attachment.html
More information about the jboss-user
mailing list