[ http://issues.apache.org/jira/browse/GERONIMO-1700?page=all ]
Alan Cabrera updated GERONIMO-1700: ----------------------------------- Fix Version/s: 1.1.x (was: 1.1.1) Moving unassigned issues over to the 1.1.x pool where they can be worked on for the, in all probability, 1.1.2 patch. > NPE on tomcat when deploying same application more than once. > ------------------------------------------------------------- > > Key: GERONIMO-1700 > URL: http://issues.apache.org/jira/browse/GERONIMO-1700 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: deployment > Affects Versions: 1.2 > Environment: windows xp, tomcat server > Reporter: Joe Bohn > Priority: Minor > Fix For: 1.1.x > > Attachments: 1700_DuplicateDeploy.patch > > > Scenario: > Deploy a web app (in my case snoop) to the tomcat server. All appears to go > well. > Attempt to deploy the same application again and the following NPE is > produced. In addition it seems that the old application remains running and > the newer application is stopped. I'm not sure if that is the desired > behavior or not, but I would have expected the opposite. > It seems that we should either fail the deployment (preferrably w/o a NPE) or > permit it to succeed but notify the user that a newer version of an earlier > application is being installed. > I also noticed that if the deployment is via the web console then there is no > notification given to the user that the deployment failed (it actually > indicates that it succeeded). > 11:08:26,765 ERROR [GBeanInstance] Problem in doFail of > default/snoop/1151420905312/war?J2EEApplication=null,j2eeType=WebModule,name=default/snoop/1151420905312 > /war > java.lang.RuntimeException: java.lang.NullPointerException > at > org.apache.geronimo.tomcat.TomcatContainer.removeContext(TomcatContainer.java:327) > at > org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.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:122) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817) > 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.tomcat.TomcatContainer$$EnhancerByCGLIB$$fad085bb.removeContext(<generated>) > at > org.apache.geronimo.tomcat.TomcatWebAppContext.doFail(TomcatWebAppContext.java:469) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:1010) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540) > at > org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379) > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374) > at > org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:512) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:493) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.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:122) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817) > 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.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$e11b3334.startConfiguration(<generated>) > at > org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67) > at java.lang.Thread.run(Thread.java:534) > Caused by: java.lang.NullPointerException > at java.io.File.<init>(File.java:180) > at > org.apache.catalina.core.StandardContext.getWorkPath(StandardContext.java:1789) > at > org.apache.catalina.startup.ContextConfig.destroy(ContextConfig.java:1269) > at > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:281) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4419) > at > org.apache.geronimo.tomcat.TomcatContainer.removeContext(TomcatContainer.java:325) > ... 31 more > 11:08:26,781 ERROR [GBeanInstanceState] Error while starting; GBean is now in > the FAILED state: > abstractName="default/snoop/1151420905312/war?J2EEApplication=nu > ll,j2eeType=WebModule,name=default/snoop/1151420905312/war" > java.lang.IllegalArgumentException: addChild: Child name '/snoop' is not > unique > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:749) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) > at > org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313) > at > org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.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:122) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817) > 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.tomcat.TomcatContainer$$EnhancerByCGLIB$$fad085bb.addContext(<generated>) > at > org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:448) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540) > at > org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379) > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374) > at > org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:512) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:493) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.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:122) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817) > 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.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$e11b3334.startConfiguration(<generated>) > at > org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67) > at java.lang.Thread.run(Thread.java:534) > org.apache.geronimo.kernel.config.LifecycleException: start of > default/snoop/1151420905312/war failed > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:529) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:493) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.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:122) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817) > 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.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$e11b3334.startConfiguration(<generated>) > at > org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67) > at java.lang.Thread.run(Thread.java:534) > Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown > start exception > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:440) > at > org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:512) > ... 12 more > Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: > Configuration default/snoop/1151420905312/war failed to start due to the > following reasons: > The service > J2EEApplication=null,j2eeType=WebModule,name=default/snoop/1151420905312/war > did not start because the doStart method threw an exception. > java.lang.IllegalArgumentException: addChild: Child name '/snoop' is not > unique > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:749) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) > at > org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313) > at > org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.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:122) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817) > 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.tomcat.TomcatContainer$$EnhancerByCGLIB$$fad085bb.addContext(<generated>) > at > org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:448) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540) > at > org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379) > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374) > at > org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:512) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:493) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.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:122) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817) > 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.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$e11b3334.startConfiguration(<generated>) > at > org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67) > at java.lang.Thread.run(Thread.java:534) > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:403) > ... 14 more > Deployer operation failed: start of default/snoop/1151420905312/war failed > org.apache.geronimo.kernel.config.LifecycleException: start of > default/snoop/1151420905312/war failed > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:529) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:493) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.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:122) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817) > 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.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$e11b3334.startConfiguration(<generated>) > at > org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67) > at java.lang.Thread.run(Thread.java:534) > Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown > start exception > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:440) > at > org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:512) > ... 12 more > Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: > Configuration default/snoop/1151420905312/war failed to start due to the > following reasons: > The service > J2EEApplication=null,j2eeType=WebModule,name=default/snoop/1151420905312/war > did not start because the doStart method threw an exception. > java.lang.IllegalArgumentException: addChild: Child name '/snoop' is not > unique > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:749) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) > at > org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313) > at > org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.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:122) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817) > 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.tomcat.TomcatContainer$$EnhancerByCGLIB$$fad085bb.addContext(<generated>) > at > org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:448) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540) > at > org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379) > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374) > at > org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:512) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:493) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.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:122) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817) > 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.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$e11b3334.startConfiguration(<generated>) > at > org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67) > at java.lang.Thread.run(Thread.java:534) > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:403) > ... 14 more -- 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