Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 7549 invoked from network); 27 Jun 2006 15:27:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Jun 2006 15:27:12 -0000 Received: (qmail 33890 invoked by uid 500); 27 Jun 2006 15:27:08 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 33818 invoked by uid 500); 27 Jun 2006 15:27:07 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 33674 invoked by uid 99); 27 Jun 2006 15:27:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jun 2006 08:27:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jun 2006 08:27:05 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B63C27141F3 for ; Tue, 27 Jun 2006 15:25:30 +0000 (GMT) Message-ID: <30987869.1151421930743.JavaMail.jira@brutus> Date: Tue, 27 Jun 2006 15:25:30 +0000 (GMT+00:00) From: "Joe Bohn (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Updated: (GERONIMO-1700) NPE on tomcat when deploying same application more than once. In-Reply-To: <1838894688.1141684710741.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/GERONIMO-1700?page=all ] Joe Bohn updated GERONIMO-1700: ------------------------------- Summary: NPE on tomcat when deploying same application more than once. (was: Web Console prints a stack trace when attempting to deploy an application that is already deployed.) Environment: windows xp, tomcat server (was: windows xp) Component: deployment (was: console) Fix Version: 1.1.1 (was: 1.2) Description: 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() 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() 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() 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() 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.(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() 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() 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() 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() 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() 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() 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() 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() 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() 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() 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() 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() 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() 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() 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() 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() 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 was:Currently, when you attempt to deploy an application via the web console which has already been deployed, you will see a stack trace for the DeploymentException printed in the console (non web). The command line deployment will simply return a message (which the web console also returns on the GUI itself). We should not print stack traces for normal/expected situations that are not errors. Updated the problem record to reflect change in symptoms since originally opened. > NPE on tomcat when deploying same application more than once. > ------------------------------------------------------------- > > Key: GERONIMO-1700 > URL: http://issues.apache.org/jira/browse/GERONIMO-1700 > Project: Geronimo > Type: Bug > Security: public(Regular issues) > Components: deployment > Versions: 1.2 > Environment: windows xp, tomcat server > Reporter: Joe Bohn > Priority: Minor > Fix For: 1.1.1 > 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() > 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() > 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() > 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() > 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.(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() > 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() > 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() > 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() > 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() > 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() > 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() > 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() > 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() > 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() > 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() > 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() > 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() > 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() > 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() > 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() > 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