geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rakesh Midha (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GERONIMO-2583) java.lang.NoClassDefFoundError: org/apache/geronimo/deployment/plugin/ConfigIDExtractor
Date Mon, 20 Nov 2006 11:34:02 GMT
    [ http://issues.apache.org/jira/browse/GERONIMO-2583?page=comments#action_12451284 ] 
            
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
classes.

To show the problem let me show you output of the following intresting code written in DirectoryHotDeployer
class:
     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
classloader 

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/
classloader.








> java.lang.NoClassDefFoundError: org/apache/geronimo/deployment/plugin/ConfigIDExtractor
> ---------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-2583
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-2583
>             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 http://www.mail-archive.com/dev@geronimo.apache.org/msg28048.html
and I think the patch was provided as a part of M2 migration in http://issues.apache.org/jira/browse/GERONIMO-2067#action_12423814
(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(ClassLoader.java:537)
>         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
> 3)
>         at org.apache.geronimo.kernel.classloader.JarFileClassLoader.access$200(
> JarFileClassLoader.java:52)
>         at org.apache.geronimo.kernel.classloader.JarFileClassLoader$6.run(JarFi
> leClassLoader.java:298)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.apache.geronimo.kernel.classloader.JarFileClassLoader.findClass(J
> arFileClassLoader.java:250)
>         at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(Mu
> ltiParentClassLoader.java:292)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>         at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(Mu
> ltiParentClassLoader.java:276)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>         at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(Mu
> ltiParentClassLoader.java:276)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:141)
>         at org.apache.geronimo.deployment.hot.DirectoryMonitor.class$(DirectoryM
> onitor.java:47)
>         at org.apache.geronimo.deployment.hot.DirectoryMonitor.calculateModuleId
> (DirectoryMonitor.java:369)
>         at org.apache.geronimo.deployment.hot.DirectoryMonitor.initialize(Direct
> oryMonitor.java:238)
>         at org.apache.geronimo.deployment.hot.DirectoryMonitor.run(DirectoryMoni
> tor.java:214)
>         at java.lang.Thread.run(Thread.java:534)
> 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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message