Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 99879 invoked from network); 1 Aug 2006 11:15:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Aug 2006 11:15:49 -0000 Received: (qmail 6990 invoked by uid 500); 1 Aug 2006 11:15:46 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 6941 invoked by uid 500); 1 Aug 2006 11:15:46 -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 6930 invoked by uid 99); 1 Aug 2006 11:15:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2006 04:15:46 -0700 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=INFO_TLD 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, 01 Aug 2006 04:15:45 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 482AB410011 for ; Tue, 1 Aug 2006 11:13:14 +0000 (GMT) Message-ID: <9673677.1154430794293.JavaMail.jira@brutus> Date: Tue, 1 Aug 2006 04:13:14 -0700 (PDT) From: "John Sisson (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Updated: (GERONIMO-1996) Error during deployment may result in files not being cleaned up properly In-Reply-To: <20298259.1147053920902.JavaMail.jira@brutus> 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-1996?page=all ] John Sisson updated GERONIMO-1996: ---------------------------------- Summary: Error during deployment may result in files not being cleaned up properly (was: Serialization failure during deployment leaves a config.ser in the repository but doesn't write a config.info causing problems later.) > Error during deployment may result in files not being cleaned up properly > ------------------------------------------------------------------------- > > Key: GERONIMO-1996 > URL: http://issues.apache.org/jira/browse/GERONIMO-1996 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: deployment > Affects Versions: 1.1 > Reporter: John Sisson > Assigned To: John Sisson > Fix For: 1.2, 1.1.1 > > Attachments: jira-g-1996.zip > > > h1. Problem > If an Error (java.lang.Error and its subclasses) occurs during deployment and the deployment operation fails it may not be possible to redeploy. > h1. Symptom > Example of exception during serialization phase of deployment: > {code} > java.lang.ClassCastException > at org.apache.xerces.parsers.DOMParser.(Unknown Source) > at org.apache.xerces.parsers.DOMParser.(Unknown Source) > at com.foo.common.xml.XMLNode.loadXML(XMLNode.java:534) > at com.foo.common.xml.XMLNode.loadXML(XMLNode.java:520) > > at com.foo.server.ejb.Bar.(FooBean.java:104) > at java.io.ObjectStreamClass.hasStaticInitializer(Native Method) > at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1557) > at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:47) > > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) > at org.apache.geronimo.gbean.GBeanData.writeExternal(GBeanData.java:186) > at org.apache.geronimo.kernel.config.SerializedGBeanState.storeGBeans(SerializedGBeanState.java:139) > at org.apache.geronimo.kernel.config.SerializedGBeanState.writeObject(SerializedGBeanState.java:92) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809) > at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296) > at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247) > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) > at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332) > at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304) > at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247) > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) > at org.apache.geronimo.kernel.config.SerializedConfigurationMarshaler.writeConfigurationData(SerializedConfigurationMarshale > r.java:66) > at org.apache.geronimo.kernel.config.ConfigurationUtil.writeConfigurationData(ConfigurationUtil.java:163) > at org.apache.geronimo.system.configuration.ExecutableConfigurationUtil.writeConfiguration(ExecutableConfigurationUtil.java: > 149) > at org.apache.geronimo.system.configuration.RepositoryConfigurationStore.install(RepositoryConfigurationStore.java:318) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:308) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:119) > {code} > When restarting Geronimo after a deployment that failed during serialization you may see the following exception: > {code} > ERROR [RepositoryConfigurationStore] Unable to load ConfigurationInfo for com.acme.foo/foo-server-plus/3.4.060322-SNAPSHOT/ear > java.io.FileNotFoundException: C:\test\geronimo-1.1-SNAPSHOT\repository\com\acme\foo\foo-server-plus\3.4.060322-SNAPSHOT\ > foo-server-plus-3.4.060322-SNAPSHOT.ear\META-INF\config.info (The system cannot find the file specified) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.(FileInputStream.java:106) > at org.apache.geronimo.system.configuration.RepositoryConfigurationStore.loadConfigurationInfo(RepositoryConfigurationStore. > java:401) > at org.apache.geronimo.system.configuration.RepositoryConfigurationStore.listConfigurations(RepositoryConfigurationStore.jav > a:375) > {code} > Error if you attempt to undeploy the configuration you get: > {code} > 11:04:27,699 ERROR [RepositoryConfigurationStore] Unable to load ConfigurationInfo for com.acme.foo/foo-server-plus/3.4.0 > 60322-SNAPSHOT/ear > java.io.FileNotFoundException: C:\test\geronimo-1.1-SNAPSHOT\repository\com\acme\foo\foo-server-plus\3.4.060322-SNAPSHOT\ > foo-server-plus-3.4.060322-SNAPSHOT.ear\META-INF\config.info (The system cannot find the file specified) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.(FileInputStream.java:106) > at org.apache.geronimo.system.configuration.RepositoryConfigurationStore.loadConfigurationInfo(RepositoryConfigurationStore. > java:401) > at org.apache.geronimo.system.configuration.RepositoryConfigurationStore.listConfigurations(RepositoryConfigurationStore.jav > a:375) > at org.apache.geronimo.system.configuration.RepositoryConfigurationStore$$FastClassByCGLIB$$968bf00c.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.ConfigurationStore$$EnhancerByCGLIB$$63a4331e.listConfigurations() > at org.apache.geronimo.kernel.config.SimpleConfigurationManager.listConfigurations(SimpleConfigurationManager.java:171) > at org.apache.geronimo.kernel.config.SimpleConfigurationManager.listConfigurations(SimpleConfigurationManager.java:164) > {code} > h1. Cause > If an Error (java.lang.Error and its subclasses) occurs during deployment the Error is not caught then files that may have been written during the deployment operation are not cleaned up. In particular if an Error occurs during the serialization phase of deployment, the failure causes an (incomplete?) config.ser to be written to the repository and a config.info file is not written due to the Error being thrown, which can cause problems when Geronimo is restarted (see Symptoms). > h1. Solution > Corrected exception handling to catch Errors to perform cleanup of files. Also changed order of cleanup so module file in repository is closed before attempting to clean it up. > h1. Workaround > Correct the cause of the Error during deployment. > Shut down Geronimo. Remove any entry that was added for the failed deploy attempt in geronimo\var\config.xml, delete the files that were partially deployed under the geronimo\repository directory. Restart Geronimo. -- 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