geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rakesh Midha (JIRA)" <>
Subject [jira] Commented: (GERONIMO-2583) java.lang.NoClassDefFoundError: org/apache/geronimo/deployment/plugin/ConfigIDExtractor
Date Mon, 20 Nov 2006 11:34:02 GMT
    [ ] 
Rakesh Midha commented on GERONIMO-2583:

The problem is not happening because geronimo-hot-deploy is not able to use classes in its
dependency geronimo-deploy-jsr88. 

Problem is in the classloader which load the geronimo-hot-deploy and  geronimo-deploy-jsr88

To show the problem let me show you output of the following intresting code written in DirectoryHotDeployer
     System.out.println("class this ="+this.getClass().getClassLoader());
     System.out.println("deploytool ="+org.apache.geronimo.deployment.cli.DeployTool.class.getClassLoader());
     System.out.println("deploytool ="+org.apache.geronimo.deployment.Deployer.class.getClassLoader());
     System.out.println("configtool ="+org.apache.geronimo.deployment.plugin.ConfigIDExtractor.class.getClassLoader());

class this =[org.apache.geronimo.kernel.classloader.JarFileClassLoader id=org.apache.geronimo.configs/hot-deployer/1.2-SNAPSHOT/car]

deploytool =[org.apache.geronimo.kernel.classloader.JarFileClassLoader id=org.apache.geronimo.configs/geronimo-gbean-deployer/1.2-SNAPSHOT/car]

deploytool =[org.apache.geronimo.kernel.classloader.JarFileClassLoader id=org.apache.geronimo.configs/geronimo-gbean-deployer/1.2-SNAPSHOT/car]

configtool =[org.apache.geronimo.kernel.classloader.JarFileClassLoader id=org.apache.geronimo.configs/hot-deployer/1.2-SNAPSHOT/car]

This clearly shows that all the classes in geronimo-hot-deploy and geronimo-deploy-jsr88 module
are loaded in hot-deployer classloader where as
classes in geronimo-deployment and geronimo-deploy-tool module in  geronimo-gbean-deployer

Which means geronimo-hot-deploy is able to find classess in  geronimo-deploy-jsr88, geronimo-deployment
 and geronimo-deploy-tool because of dependency graph. (this is true because otherwise my
system.out.println would have given NoClassDefFoundException)

Still after System.out.println("configtool ="+org.apache.geronimo.deployment.plugin.ConfigIDExtractor.class.getClassLoader());
is exceuted and printed its classloader, it throws (defined in problem description before)
java.lang.NoClassDefFoundError: org/apache/geronimo/deployment/plugin/ConfigIDExtractor

This is happening becuase geronimo-hot-deploy is calling a class in geronimo-deploy-tool which
is calling a class in geronimo-deploy-jsr88, so now because geronimo-deploy-jsr88 is in child
classloader it is never found.

Notice that geronimo-gbean-deployer configuration shows dependecy on geronimo-deploy-tool,
geronimo-deploy-config and geronimo-j2ee-deployment_1.1_spec as a part of bootstrap. The hot-deployer
should also be there.

The patch is attached to make sure that all these related classes are loaded in same classloaded.
With this patch in addition to geronimo-deploy-tool, geronimo-deploy-config, and geronimo-j2ee-deployment_1.1_spec
geronimo-deploy-jsr88, geronimo-system and geronimo-hot-deploy are loaded in geronimo-gbean-deployer/

> java.lang.NoClassDefFoundError: org/apache/geronimo/deployment/plugin/ConfigIDExtractor
> ---------------------------------------------------------------------------------------
>                 Key: GERONIMO-2583
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Hot Deploy Dir
>    Affects Versions: 1.2
>         Environment: Windows Xp, should be valid for all platforms
>            Reporter: Rakesh Midha
>         Assigned To: Rakesh Midha
>             Fix For: 1.2
>         Attachments: hotdeploygbean.patch
> Hello
> This issue was discussed before in
and I think the patch was provided as a part of M2 migration in
(It says any other issue open new JIRA, so opening this one)
> I downloaded latest trunk, and tried to use hot-deployer. Every time I try to use hot-deployer
I get exception.
> java.lang.NoClassDefFoundError: org/apache/geronimo/deployment/plugin/ConfigIDExtractor
>         at java.lang.ClassLoader.defineClass0(Native Method)
>         at java.lang.ClassLoader.defineClass(
>         at
> 3)
>         at org.apache.geronimo.kernel.classloader.JarFileClassLoader.access$200(
>         at org.apache.geronimo.kernel.classloader.JarFileClassLoader$
>         at Method)
>         at org.apache.geronimo.kernel.classloader.JarFileClassLoader.findClass(J
>         at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(Mu
>         at java.lang.ClassLoader.loadClass(
>         at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(Mu
>         at java.lang.ClassLoader.loadClass(
>         at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(Mu
>         at java.lang.ClassLoader.loadClass(
>         at java.lang.ClassLoader.loadClassInternal(
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(
>         at$(DirectoryM
>         at
> (
>         at
>         at
>         at
> The class is in geronimo-deploy-jsr88, and hot-deploy pom.xml already shows hot-deploy
to be dependent on geronimo-deploy-jsr88, which means the above class should be available.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message