[ https://issues.apache.org/jira/browse/GERONIMO-3421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods closed GERONIMO-3421. ---------------------------------- Resolution: Fixed Fix Version/s: 2.1 Committed revision 569528 in 2.0.2-SNAPSHOT Committed revision 569530 in 2.1-SNAPSHOT Toby, thanks for the patch. > ClassFinder classloader problems cause deployer to hang > ------------------------------------------------------- > > Key: GERONIMO-3421 > URL: https://issues.apache.org/jira/browse/GERONIMO-3421 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: deployment > Affects Versions: 2.0.x > Environment: Java(TM) 2 Runtime Environment, Standard Edition (build > 1.5.0_12-b04) > CentOS release 5 (Final) > Reporter: toby cabot > Assignee: Donald Woods > Priority: Minor > Fix For: 2.0.x, 2.1 > > Attachments: deployer-message-patch.txt > > > I build an ear file (containing a rar and a war) with a bug and tried to > deploy it. The deployer printed this stack trace to the console and then > hung: > Exception in thread "Thread-6" java.lang.NoClassDefFoundError: > org/jdom/JDOMException > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2395) > at java.lang.Class.getDeclaredMethods(Class.java:1763) > at org.apache.xbean.finder.ClassFinder.<init>(ClassFinder.java:162) > at > org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:796) > at > org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.configureBasicWebModuleAttributes(AbstractWebModuleBuilder.java:813) > at > org.apache.geronimo.jetty6.deployment.JettyModuleBuilder.addGBeans(JettyModuleBuilder.java:337) > at > org.apache.geronimo.jetty6.deployment.JettyModuleBuilder$$FastClassByCGLIB$$1a00be84.invoke(<generated>) > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830) > at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57) > at > org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35) > at > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96) > at > org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$35300f85.addGBeans(<generated>) > at > org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165) > at > org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$$FastClassByCGLIB$$d0c31844.invoke(<generated>) > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830) > at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57) > at > org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35) > at > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96) > at > org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$35300f85.addGBeans(<generated>) > at > org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:628) > at > org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>) > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830) > at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57) > at > org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35) > at > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96) > at > org.apache.geronimo.j2ee.deployment.CorbaGBeanNameSource$$EnhancerByCGLIB$$6c5d899a.buildConfiguration(<generated>) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:304) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:126) > at > org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>) > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at > org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865) > at > org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239) > at > org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116) > at > org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61) > at java.lang.Thread.run(Thread.java:595) > The bug in my app was that the rar was missing a dependency jar that it > needed, so this was the cause of the NoClassDefFoundError, but the stack > trace is a red herring - it makes it look as if the problem is a bug in > Geronimo rather than a bad user config. The deployer shouldn't hang in any > case. > The problem appears to be that ClassFinder can throw NoClassDefFoundError but > the AbstractWebModuleBuilder doesn't catch it. I added a catch so the > deployer now exits with an error and provides a somewhat more helpful error > message: > Deployer operation failed: root.war classloader can't find > org/jdom/JDOMException > org.apache.geronimo.common.DeploymentException: root.war classloader can't > find org/jdom/JDOMException > at > org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:799) > etc... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.