geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Sisson (JIRA)" <...@geronimo.apache.org>
Subject [jira] Updated: (GERONIMO-1996) Serialization failure during deployment leaves a config.ser in the repository but doesn't write a config.info causing problems later.
Date Tue, 01 Aug 2006 11:11:16 GMT
     [ http://issues.apache.org/jira/browse/GERONIMO-1996?page=all ]

John Sisson updated GERONIMO-1996:
----------------------------------

    Fix Version/s: 1.2
      Description: 
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.<init>(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at com.foo.common.xml.XMLNode.loadXML(XMLNode.java:534)
        at com.foo.common.xml.XMLNode.loadXML(XMLNode.java:520)
        <SNIP>
        at com.foo.server.ejb.Bar.<clinit>(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)
        <SNIP>
        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.<init>(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.<init>(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(<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.ConfigurationStore$$EnhancerByCGLIB$$63a4331e.listConfigurations(<generated>)
        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 <module ..> 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.


  was:
If an exception occurs during the serialization phase of deployment, the failure causes an
(incomplete?) config.ser in the repository but doesn't write a config.info file.

If Geronimo is restarted the configuration will attempt to be started and you will get a FileNotFoundException
for the config.info file (exception shown below).

If you attempt to undeploy the configuration you also get a FileNotFoundException (also shown
below).

=============================

Example of exception during serialization phase of deployment:

java.lang.ClassCastException
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at com.foo.common.xml.XMLNode.loadXML(XMLNode.java:534)
        at com.foo.common.xml.XMLNode.loadXML(XMLNode.java:520)
        <SNIP>
        at com.foo.server.ejb.Bar.<clinit>(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.ObjectStreamClass$1.run(ObjectStreamClass.java:173)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:170)
        at java.io.ObjectStreamClass.writeNonProxy(ObjectStreamClass.java:557)
        at java.io.ObjectOutputStream.writeClassDescriptor(ObjectOutputStream.java:591)
        at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1142)
        at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1100)
        at java.io.ObjectOutputStream.writeClass(ObjectOutputStream.java:1082)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:996)
        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.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.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.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.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)
        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:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:852)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:338)
        at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.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:852)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:168)
        at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:221)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
        at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:84)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
        at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:203
)
        at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1043)
        at mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java:219)
        at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:34)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(RMIConnectionSubjectInvoker.java:99)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(RMIConnectionSubjectInvoker.java:31)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(RMIConnectionSubjectInvoker.java:90)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
        at mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:163)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(RMIConnectionSubjectInvoker.java:86)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(RMIConnectionSubjectInvoker.java:80)
        at $Proxy0.invoke(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:221)
        at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        at sun.rmi.transport.Transport$1.run(Transport.java:148)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:534)

==============================

Error when geronimo is restarted:

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.<init>(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(<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.ConfigurationStore$$EnhancerByCGLIB$$63a4331e.listConfigurations(<generated>)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.listConfigurations(SimpleConfigurationManager.java:171)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.listConfigurations(SimpleConfigurationManager.java:164)
        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$$979786.listConfigurations(<generated>)
        at org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager.getModules(JMXDeploymentManager.java:142)
        at org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager.getAvailableModules(JMXDeploymentManager.java:108)
        at org.apache.geronimo.deployment.hot.DirectoryHotDeployer.doStart(DirectoryHotDeployer.java:141)
        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:174)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:505)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:486)
        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$$979786.startConfiguration(<generated>)
        at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:287)
        at org.apache.geronimo.system.main.Daemon.<init>(Daemon.java:74)
        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:367)

==============================

Error if you attempt to undeploy the configuration you get:

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.<init>(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(<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.ConfigurationStore$$EnhancerByCGLIB$$63a4331e.listConfigurations(<generated>)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.listConfigurations(SimpleConfigurationManager.java:171)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.listConfigurations(SimpleConfigurationManager.java:164)
        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:852)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:338)
        at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.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:852)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:168)
        at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:221)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
        at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:84)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
        at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:203
)
        at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1043)
        at mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java:219)
        at sun.reflect.GeneratedMethodAccessor212.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:34)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(RMIConnectionSubjectInvoker.java:99)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(RMIConnectionSubjectInvoker.java:31)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(RMIConnectionSubjectInvoker.java:90)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
        at mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:163)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(RMIConnectionSubjectInvoker.java:86)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(RMIConnectionSubjectInvoker.java:80)
        at $Proxy0.invoke(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:221)
        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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        at sun.rmi.transport.Transport$1.run(Transport.java:148)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:534)


> Serialization failure during deployment leaves a config.ser in the repository but doesn't
write a config.info causing problems later.
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 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.<init>(Unknown Source)
>         at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
>         at com.foo.common.xml.XMLNode.loadXML(XMLNode.java:534)
>         at com.foo.common.xml.XMLNode.loadXML(XMLNode.java:520)
>         <SNIP>
>         at com.foo.server.ejb.Bar.<clinit>(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)
>         <SNIP>
>         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.<init>(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.<init>(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(<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.ConfigurationStore$$EnhancerByCGLIB$$63a4331e.listConfigurations(<generated>)
>         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 <module ..> 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

        

Mime
View raw message