Failed web app deployment cannot be undeployed
----------------------------------------------
Key: GERONIMO-1954
URL: http://issues.apache.org/jira/browse/GERONIMO-1954
Project: Geronimo
Type: Bug
Security: public (Regular issues)
Components: deployment
Versions: 1.1
Reporter: John Sisson
Priority: Blocker
Fix For: 1.1
Encountered the situation where deploying a web app in an ear where the web app
has not been configured correctly you will get a deployment error, but the
since deployment didn't complete, a config.ser file wasn't written to the
repository, although other files for the configuration were written to the
repository.
If you attempt to undeploy, you will get a "configId does not appear to be a
the name of a module available on the selected server." error message. This is
due to undeploy processing (see debug info below) calling listConfigurations()
that relies upon config.ser being present.
Debugging notes ....
#
# Initial deployment attempt of an ear that has an error during deployment
#
C:\test>geronimo-1.1-SNAPSHOT\bin\deploy --user system --password manager
deploy myTest.ear myTestPlan.xml
Using GERONIMO_BASE: C:\test\geronimo-1.1-SNAPSHOT
Using GERONIMO_HOME: C:\test\geronimo-1.1-SNAPSHOT
Using GERONIMO_TMPDIR: C:\test\geronimo-1.1-SNAPSHOT\var\temp
Using JRE_HOME: C:\j2sdk1.4.2_10
Error: Unable to distribute myTest.ear: web.xml includes
security elements but Geronimo deployment plan is not provided or
does not contain <security-realm-name> element necessary to
configure security accordingly.
Deployment creates a configuration dir in the repository..
System Thread [RMI TCP Connection(885)-172.21.35.100] (Suspended (entry into
method createNewConfigurationDir in
org.apache.geronimo.system.configuration.RepositoryConfigurationStore)) (out of
synch)
org.apache.geronimo.system.configuration.RepositoryConfigurationStore.createNewConfigurationDir(org.apache.geronimo.kernel.repository.Artifact)
line: 171 (out of synch)
org.apache.geronimo.system.configuration.RepositoryConfigurationStore$$FastClassByCGLIB$$968bf00c.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
<SNIP>
org.apache.geronimo.kernel.config.ConfigurationStore$$EnhancerByCGLIB$$7d844901.createNewConfigurationDir(org.apache.geronimo.kernel.repository.Artifact)
line: not available
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(boolean,
org.apache.geronimo.kernel.repository.Artifact, java.lang.Object,
java.util.jar.JarFile, java.util.Collection,
org.apache.geronimo.kernel.repository.ArtifactResolver,
org.apache.geronimo.kernel.config.ConfigurationStore) line: 411
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
<SNIP>
org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$ffe6c609.buildConfiguration(boolean,
org.apache.geronimo.kernel.repository.Artifact, java.lang.Object,
java.util.jar.JarFile, java.util.Collection,
org.apache.geronimo.kernel.repository.ArtifactResolver,
org.apache.geronimo.kernel.config.ConfigurationStore) line: not available
org.apache.geronimo.deployment.Deployer.deploy(boolean, java.io.File,
java.io.File, java.io.File, boolean, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String) line: 301
org.apache.geronimo.deployment.Deployer.deploy(boolean, java.io.File,
java.io.File) line: 120
<RMI Call>
Files/dirs are added to the repository from the ear
System Thread [RMI TCP Connection(907)-172.21.35.100] (Suspended)
org.apache.geronimo.deployment.CopyResourceContext.addFile(java.io.File,
java.util.zip.ZipFile, java.util.zip.ZipEntry) line: 158
org.apache.geronimo.deployment.CopyResourceContext.addFile(java.net.URI,
java.util.zip.ZipFile, java.util.zip.ZipEntry) line: 132
org.apache.geronimo.j2ee.deployment.EARContext(org.apache.geronimo.deployment.DeploymentContext).addFile(java.net.URI,
java.util.zip.ZipFile, java.util.zip.ZipEntry) line: 311
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(boolean,
org.apache.geronimo.kernel.repository.Artifact, java.lang.Object,
java.util.jar.JarFile, java.util.Collection,
org.apache.geronimo.kernel.repository.ArtifactResolver,
org.apache.geronimo.kernel.config.ConfigurationStore) line: 450
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
<SNIP>
Tomcat Builder throws deployment exception leaving files previously added in
repo, but no config.ser is in the repo.
System Thread [RMI TCP Connection(907)-172.21.35.100] (Suspended)
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext(org.apache.geronimo.j2ee.deployment.EARContext,
org.apache.geronimo.j2ee.deployment.Module, java.lang.ClassLoader) line: 269
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder$$FastClassByCGLIB$$6f85ec2c.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object,
java.lang.Object[]) line: 53
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang.Object,
java.lang.Object[]) line: 38
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Object,
java.lang.Object[]) line: 122
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(int,
java.lang.Object[]) line: 816
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(int,
java.lang.Object[]) line: 57
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(org.apache.geronimo.gbean.AbstractName,
java.lang.Object[]) line: 35
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(java.lang.Object,
java.lang.reflect.Method, java.lang.Object[], net.sf.cglib.proxy.MethodProxy)
line: 96
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$f3f9bd97.initContext(org.apache.geronimo.j2ee.deployment.EARContext,
org.apache.geronimo.j2ee.deployment.Module, java.lang.ClassLoader) line: not
available
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(org.apache.geronimo.j2ee.deployment.EARContext,
org.apache.geronimo.j2ee.deployment.Module, java.lang.ClassLoader) line: 155
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$$FastClassByCGLIB$$d0c31844.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object,
java.lang.Object[]) line: 53
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang.Object,
java.lang.Object[]) line: 38
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Object,
java.lang.Object[]) line: 122
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(int,
java.lang.Object[]) line: 816
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(int,
java.lang.Object[]) line: 57
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(org.apache.geronimo.gbean.AbstractName,
java.lang.Object[]) line: 35
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(java.lang.Object,
java.lang.reflect.Method, java.lang.Object[], net.sf.cglib.proxy.MethodProxy)
line: 96
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$f3f9bd97.initContext(org.apache.geronimo.j2ee.deployment.EARContext,
org.apache.geronimo.j2ee.deployment.Module, java.lang.ClassLoader) line: not
available
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(boolean,
org.apache.geronimo.kernel.repository.Artifact, java.lang.Object,
java.util.jar.JarFile, java.util.Collection,
org.apache.geronimo.kernel.repository.ArtifactResolver,
org.apache.geronimo.kernel.config.ConfigurationStore) line: 470
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object,
java.lang.Object[]) line: 53
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang.Object,
java.lang.Object[]) line: 38
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Object,
java.lang.Object[]) line: 122
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(int,
java.lang.Object[]) line: 816
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(int,
java.lang.Object[]) line: 57
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(org.apache.geronimo.gbean.AbstractName,
java.lang.Object[]) line: 35
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(java.lang.Object,
java.lang.reflect.Method, java.lang.Object[], net.sf.cglib.proxy.MethodProxy)
line: 96
org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$ffe6c609.buildConfiguration(boolean,
org.apache.geronimo.kernel.repository.Artifact, java.lang.Object,
java.util.jar.JarFile, java.util.Collection,
org.apache.geronimo.kernel.repository.ArtifactResolver,
org.apache.geronimo.kernel.config.ConfigurationStore) line: not available
org.apache.geronimo.deployment.Deployer.deploy(boolean, java.io.File,
java.io.File, java.io.File, boolean, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String) line: 301
org.apache.geronimo.deployment.Deployer.deploy(boolean, java.io.File,
java.io.File) line: 120
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
<SNIP>
#
# Attempt to deploy again (thinking that since the previous deploy failed you
won't need to undeploy)
#
C:\test>geronimo-1.1-SNAPSHOT\bin\deploy --user system --password manager
deploy myTest.ear myTestPlan.xml
Using GERONIMO_BASE: C:\test\geronimo-1.1-SNAPSHOT
Using GERONIMO_HOME: C:\test\geronimo-1.1-SNAPSHOT
Using GERONIMO_TMPDIR: C:\test\geronimo-1.1-SNAPSHOT\var\temp
Using JRE_HOME: C:\j2sdk1.4.2_10
Error: Unable to distribute myTest.ear:
org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException:
Configuration already exists:
com.foo.bar/my-app/3.4/car
Configuration already exists:
com.foo.bar/my-app/3.4/car
Stack trace from deploy...
System Thread [RMI TCP Connection(49)-172.21.35.100] (Suspended (exception
org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException))
org.apache.geronimo.system.configuration.RepositoryConfigurationStore.createNewConfigurationDir(org.apache.geronimo.kernel.repository.Artifact)
line: 176
org.apache.geronimo.system.configuration.RepositoryConfigurationStore$$FastClassByCGLIB$$968bf00c.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object,
java.lang.Object[]) line: 53
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang.Object,
java.lang.Object[]) line: 38
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Object,
java.lang.Object[]) line: 122
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(int,
java.lang.Object[]) line: 816
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(int,
java.lang.Object[]) line: 57
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(org.apache.geronimo.gbean.AbstractName,
java.lang.Object[]) line: 35
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(java.lang.Object,
java.lang.reflect.Method, java.lang.Object[], net.sf.cglib.proxy.MethodProxy)
line: 96
org.apache.geronimo.kernel.config.ConfigurationStore$$EnhancerByCGLIB$$7d844901.createNewConfigurationDir(org.apache.geronimo.kernel.repository.Artifact)
line: not available
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(boolean,
org.apache.geronimo.kernel.repository.Artifact, java.lang.Object,
java.util.jar.JarFile, java.util.Collection,
org.apache.geronimo.kernel.repository.ArtifactResolver,
org.apache.geronimo.kernel.config.ConfigurationStore) line: 411
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object,
java.lang.Object[]) line: 53
<SNIP>
#
# Attempt to undeploy the failed deployment. The listConfigurations()
processing is looking for a config.ser file.
#
C:\test>geronimo-1.1-SNAPSHOT\bin\deploy --user system --password manager
undeploy com.foo.bar/my-app/3.4/car
Using GERONIMO_BASE: C:\test\geronimo-1.1-SNAPSHOT
Using GERONIMO_HOME: C:\test\geronimo-1.1-SNAPSHOT
Using GERONIMO_TMPDIR: C:\test\geronimo-1.1-SNAPSHOT\var\temp
Using JRE_HOME: C:\j2sdk1.4.2_10
Error:
com.foo.bar/my-app/3.4/car does
not appear to be a the name of a module available on the selected
server. Perhaps it has already been stopped or undeployed? If
you're trying to specify a TargetModuleID, use the syntax
TargetName|ModuleName instead. If you're not sure what's running,
try the list-modules command.
System Thread [RMI TCP Connection(854)-172.21.35.100] (Suspended (entry into
method listConfigurations in
org.apache.geronimo.system.configuration.RepositoryConfigurationStore)) (out of
synch)
org.apache.geronimo.system.configuration.RepositoryConfigurationStore.listConfigurations()
line: 359 (out of synch)
org.apache.geronimo.system.configuration.RepositoryConfigurationStore$$FastClassByCGLIB$$968bf00c.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object,
java.lang.Object[]) line: 53
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang.Object,
java.lang.Object[]) line: 38
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Object,
java.lang.Object[]) line: 122
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(int,
java.lang.Object[]) line: 816
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(int,
java.lang.Object[]) line: 57
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(org.apache.geronimo.gbean.AbstractName,
java.lang.Object[]) line: 35
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(java.lang.Object,
java.lang.reflect.Method, java.lang.Object[], net.sf.cglib.proxy.MethodProxy)
line: 96
org.apache.geronimo.kernel.config.ConfigurationStore$$EnhancerByCGLIB$$7d844901.listConfigurations()
line: not available
org.apache.geronimo.kernel.config.EditableKernelConfigurationManager(org.apache.geronimo.kernel.config.SimpleConfigurationManager).listConfigurations(org.apache.geronimo.kernel.config.ConfigurationStore)
line: 168
org.apache.geronimo.kernel.config.EditableKernelConfigurationManager(org.apache.geronimo.kernel.config.SimpleConfigurationManager).listConfigurations(org.apache.geronimo.gbean.AbstractName)
line: 161
org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
<SNIP - RMI Call>
org.apache.geronimo.system.jmx.JMXProxyMethodInterceptor.intercept(java.lang.Object,
java.lang.reflect.Method, java.lang.Object[], net.sf.cglib.proxy.MethodProxy)
line: 89
org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$bed46791.listConfigurations(org.apache.geronimo.gbean.AbstractName)
line: not available
org.apache.geronimo.deployment.plugin.jmx.RemoteDeploymentManager(org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager).getModules(javax.enterprise.deploy.spi.Target[],
org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager$ConfigFilter)
line: 142
org.apache.geronimo.deployment.plugin.jmx.RemoteDeploymentManager(org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager).getAvailableModules(javax.enterprise.deploy.shared.ModuleType,
javax.enterprise.deploy.spi.Target[]) line: 108
org.apache.geronimo.deployment.cli.CommandUndeploy(org.apache.geronimo.deployment.cli.CommandStart).execute(java.io.PrintWriter,
org.apache.geronimo.deployment.cli.ServerConnection, java.lang.String[]) line:
60
org.apache.geronimo.deployment.cli.DeployTool.execute(java.lang.String[])
line: 158
org.apache.geronimo.deployment.cli.DeployTool.main(java.lang.String[])
line: 312
--
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