-
15. Re: ClassNotFound on deployment of a SchemaResolverDeployer
alesj Dec 4, 2008 4:47 PM (in response to dmlloyd)"alesj" wrote:
I'll check the NPE.
Trying to mock your case.
I've copied your xml config.
Running my demos boot, I don't get NPE.
ClassLoadingSpace:325 is used, but it's all fine. -
16. Re: ClassNotFound on deployment of a SchemaResolverDeployer
alesj Dec 4, 2008 5:25 PM (in response to dmlloyd)"alesj" wrote:
"alesj" wrote:
I'll check the NPE.
Trying to mock your case.
I've copied your xml config.
Running my demos boot, I don't get NPE.
ClassLoadingSpace:325 is used, but it's all fine.
Found it. ;-)
It's what I suspected in the first place - 1st post with import-all="false".
You probably have import-all="true" in the kernel deployers,
where you expose package capabilities:<classloading name="jboss-kernel-classloader" version="2.0.0.GA" xmlns="urn:jboss:classloading:1.0" import-all="true"> <capabilities> <package name="org.jboss.deployers.vfs.deployer.kernel"/> <package name="org.jboss.deployers.vfs.spi.deployer"/> </capabilities> <requirements/> </classloading>
It's still a bug, but you can workaround it while we fix it. :-) -
17. Re: ClassNotFound on deployment of a SchemaResolverDeployer
dmlloyd Dec 4, 2008 8:52 PM (in response to dmlloyd)Ah, great. Where should I make this change in JBossAS? in deployers.xml? I see this:
<classloader name="deployers-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true"> <root>${jboss.lib.url}jboss-deployers-core-spi.jar</root> <root>${jboss.lib.url}jboss-deployers-core.jar</root> <root>${jboss.lib.url}jboss-deployers-client-spi.jar</root> <root>${jboss.lib.url}jboss-deployers-client.jar</root> ...blah blah...
Should I change this import-all to "false"? -
18. Re: ClassNotFound on deployment of a SchemaResolverDeployer
dmlloyd Dec 4, 2008 9:12 PM (in response to dmlloyd)Hm. I see that this is "classloader" not "classloading". Perhaps I should have grepped more specifically than "classload". :-)
Which leaves me at square zero. No idea what to fix to make this work in jbossas. I'll poke around some more... -
19. Re: ClassNotFound on deployment of a SchemaResolverDeployer
dmlloyd Dec 4, 2008 10:08 PM (in response to dmlloyd)Just to clarify - I put import-all="false" on both of my deployments and the effect is unchanged...
-
20. Re: ClassNotFound on deployment of a SchemaResolverDeployer
alesj Dec 5, 2008 1:30 AM (in response to dmlloyd)"david.lloyd@jboss.com" wrote:
Just to clarify - I put import-all="false" on both of my deployments and the effect is unchanged...
On your deployments this is already false by default. ;-) -
21. Re: ClassNotFound on deployment of a SchemaResolverDeployer
dmlloyd Dec 5, 2008 9:11 AM (in response to dmlloyd)OK, taking this another way - was my solution of adding the two package dependencies the correct one? Is there a better solution? In particular, are the MC kernel bits implicitly exported as a module inside JBossAS somewhere that I can't find, so that I could import a module or modules instead of packages?
(and if not, why not? :-)) -
22. Re: ClassNotFound on deployment of a SchemaResolverDeployer
adrian.brock Dec 5, 2008 9:15 AM (in response to dmlloyd)I've uploaded a 2.0.2-SNAPSHOT of jboss-cl with a fix for this bug
https://jira.jboss.org/jira/browse/JBCL-77
if you want to try it. -
23. Re: ClassNotFound on deployment of a SchemaResolverDeployer
adrian.brock Dec 5, 2008 9:21 AM (in response to dmlloyd)"david.lloyd@jboss.com" wrote:
OK, taking this another way - was my solution of adding the two package dependencies the correct one? Is there a better solution? In particular, are the MC kernel bits implicitly exported as a module inside JBossAS somewhere that I can't find, so that I could import a module or modules instead of packages?
(and if not, why not? :-))
The module name is the name on the classloader<classloader name="deployers-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
The version is 0.0.0 since it is not explicity specified.
You can see this more explicitly if you look at server/xxx/log/boot.logDEBUG [Domain] org.jboss.classloading.spi.dependency.Domain@1021f34{DefaultDomain} add module VFSClassLoaderPolicyModule deployers-classloader:0.0.0
Most people (except the eclipse developers :-) think that importing modules
is lazy - it makes things prone to problems when modules are refactored
i.e. you move packages to other modules. -
24. Re: ClassNotFound on deployment of a SchemaResolverDeployer
dmlloyd Dec 5, 2008 9:47 AM (in response to dmlloyd)"adrian@jboss.org" wrote:
I've uploaded a 2.0.2-SNAPSHOT of jboss-cl with a fix for this bug if you want to try it.
It seems to work. In JBossAS minimal configuration, it prints the warning several times:08:37:13,719 WARN [ClassLoadingSpace] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.deployer.kernel [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency. 08:37:13,719 WARN [ClassLoadingSpace] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.spi.deployer [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency. 08:37:13,720 WARN [ClassLoadingSpace] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.deployer.kernel [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency. 08:37:13,720 WARN [ClassLoadingSpace] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.spi.deployer [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency. 08:37:13,720 WARN [ClassLoadingSpace] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.spi.deployer [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency.
...if that matters to you."adrian@jboss.org" wrote:
Most people (except the eclipse developers :-) think that importing modules is lazy - it makes things prone to problems when modules are refactored i.e. you move packages to other modules.
Hm, okay, that seems reasonable. -
25. Re: ClassNotFound on deployment of a SchemaResolverDeployer
adrian.brock Dec 5, 2008 10:11 AM (in response to dmlloyd)"david.lloyd@jboss.com" wrote:
"adrian@jboss.org" wrote:
I've uploaded a 2.0.2-SNAPSHOT of jboss-cl with a fix for this bug if you want to try it.
It seems to work. In JBossAS minimal configuration, it prints the warning several times:08:37:13,719 WARN [ClassLoadingSpace] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.deployer.kernel [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency. 08:37:13,719 WARN [ClassLoadingSpace] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.spi.deployer [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency. 08:37:13,720 WARN [ClassLoadingSpace] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.deployer.kernel [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency. 08:37:13,720 WARN [ClassLoadingSpace] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.spi.deployer [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency. 08:37:13,720 WARN [ClassLoadingSpace] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.spi.deployer [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency.
...if that matters to you.
Yes, obviously the WARNing is in the wrong place.
I've moved it such that it only prints the WARNing once - when the dependency
is fully resolved. i.e. the other module is in the correct state to be usable as an import.
I've updated a new 2.0.2-SNAPSHOT if you want to try it.
You'll probably have to remove the old one from your local maven repository
since maven only checks for snapshots once per day. -
26. Re: ClassNotFound on deployment of a SchemaResolverDeployer
dmlloyd Dec 5, 2008 10:46 AM (in response to dmlloyd)Yeah, the new snapshot only prints once per package requirement now:
09:44:08,906 WARN [RequirementDependencyItem] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.spi.deployer [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency. 09:44:08,911 WARN [RequirementDependencyItem] VFSDeploymentClassLoaderPolicyModule jboss-threads-deployer-classloader:1.0.0.Alpha resolved PackageRequirement{org.jboss.deployers.vfs.deployer.kernel [0.0.0,?)} to VFSClassLoaderPolicyModule deployers-classloader:0.0.0 which has import-all=true. Cannot check its consistency.
Off to tinker with other stuff...