[ http://issues.apache.org/jira/browse/GERONIMO-1787?page=all ]

Dain Sundstrom reassigned GERONIMO-1787:
----------------------------------------

    Assign To: Dain Sundstrom

> Possible to have a configuration partially installed that is not possible to 
> undeploy
> -------------------------------------------------------------------------------------
>
>          Key: GERONIMO-1787
>          URL: http://issues.apache.org/jira/browse/GERONIMO-1787
>      Project: Geronimo
>         Type: Bug
>     Security: public(Regular issues) 
>   Components: deployment, kernel
>     Versions: 1.0
>  Environment: Windows XP
> 1.0 branch rev 379335.
>     Reporter: John Sisson
>     Assignee: Dain Sundstrom
>     Priority: Minor
>      Fix For: 1.1

>
> When a configuration is being deployed, it causes GBeans to be serialized to 
> the config store.  During serialization, static initializers in EJBs are 
> executed.  If the static initializers in the EJBs throw an exception it 
> appears to leave the config in the config store in a partially deployed state 
> that cannot be undeployed.
> The workaround to undeploy it is to edit the 
> geronimo\config-store\index.properties file and to delete the numbered 
> directory for the configuration under the geronimo\config-store directory.
> Here is an example of a static initializer of an EJB being executed during 
> deployment.  (More info below stack trace).
>     System Thread [RMI TCP Connection(5)-172.21.35.100] (Suspended (exception 
> java.lang.ClassCastException))
>         
> org.apache.xerces.parsers.DOMParser.<init>(org.apache.xerces.util.SymbolTable,
>  org.apache.xerces.xni.grammars.XMLGrammarPool) line: not available
>         org.apache.xerces.parsers.DOMParser.<init>() line: not available
>         <SNIP>
>         com.acme.myapp.ejb.MyBean.<clinit>() line: not available
>         java.io.ObjectStreamClass.hasStaticInitializer(java.lang.Class) line: 
> not available [native method]
>         java.io.ObjectStreamClass.computeDefaultSUID(java.lang.Class) line: 
> 1557
>         java.io.ObjectStreamClass.access$100(java.lang.Class) line: 47
>         java.io.ObjectStreamClass$1.run() line: 173
>         
> java.security.AccessController.doPrivileged(java.security.PrivilegedAction) 
> line: not available [native method]
>         java.io.ObjectStreamClass.getSerialVersionUID() line: 170
>         java.io.ObjectStreamClass.writeNonProxy(java.io.ObjectOutputStream) 
> line: 557
>         
> java.io.ObjectOutputStream.writeClassDescriptor(java.io.ObjectStreamClass) 
> line: 591
>         
> java.io.ObjectOutputStream.writeNonProxyDesc(java.io.ObjectStreamClass, 
> boolean) line: 1142
>         java.io.ObjectOutputStream.writeClassDesc(java.io.ObjectStreamClass, 
> boolean) line: 1100
>         java.io.ObjectOutputStream.writeClass(java.lang.Class, boolean) line: 
> 1082
>         java.io.ObjectOutputStream.writeObject0(java.lang.Object, boolean) 
> line: 996
>         java.io.ObjectOutputStream.defaultWriteFields(java.lang.Object, 
> java.io.ObjectStreamClass) line: 1332
>         java.io.ObjectOutputStream.writeSerialData(java.lang.Object, 
> java.io.ObjectStreamClass) line: 1304
>         java.io.ObjectOutputStream.writeOrdinaryObject(java.lang.Object, 
> java.io.ObjectStreamClass, boolean) line: 1247
>         java.io.ObjectOutputStream.writeObject0(java.lang.Object, boolean) 
> line: 1052
>         java.io.ObjectOutputStream.defaultWriteFields(java.lang.Object, 
> java.io.ObjectStreamClass) line: 1332
>         java.io.ObjectOutputStream.writeSerialData(java.lang.Object, 
> java.io.ObjectStreamClass) line: 1304
>         java.io.ObjectOutputStream.writeOrdinaryObject(java.lang.Object, 
> java.io.ObjectStreamClass, boolean) line: 1247
>         java.io.ObjectOutputStream.writeObject0(java.lang.Object, boolean) 
> line: 1052
>         java.io.ObjectOutputStream.defaultWriteFields(java.lang.Object, 
> java.io.ObjectStreamClass) line: 1332
>         java.io.ObjectOutputStream.writeSerialData(java.lang.Object, 
> java.io.ObjectStreamClass) line: 1304
>         java.io.ObjectOutputStream.writeOrdinaryObject(java.lang.Object, 
> java.io.ObjectStreamClass, boolean) line: 1247
>         java.io.ObjectOutputStream.writeObject0(java.lang.Object, boolean) 
> line: 1052
>         java.io.ObjectOutputStream.defaultWriteFields(java.lang.Object, 
> java.io.ObjectStreamClass) line: 1332
>         java.io.ObjectOutputStream.writeSerialData(java.lang.Object, 
> java.io.ObjectStreamClass) line: 1304
>         java.io.ObjectOutputStream.writeOrdinaryObject(java.lang.Object, 
> java.io.ObjectStreamClass, boolean) line: 1247
>         java.io.ObjectOutputStream.writeObject0(java.lang.Object, boolean) 
> line: 1052
>         java.io.ObjectOutputStream.writeObject(java.lang.Object) line: 278
>         
> org.apache.geronimo.gbean.GBeanData.writeExternal(java.io.ObjectOutput) line: 
> 137
>         
> org.apache.geronimo.kernel.config.Configuration.storeGBeans(java.util.List) 
> line: 614
>         
> org.apache.geronimo.system.configuration.ExecutableConfigurationUtil.getConfigurationGBeanData(org.apache.geronimo.kernel.config.ConfigurationData)
>  line: 166
>         
> org.apache.geronimo.system.configuration.ExecutableConfigurationUtil.writeConfiguration(org.apache.geronimo.kernel.config.ConfigurationData,
>  java.io.File) line: 122
>         
> org.apache.geronimo.system.configuration.LocalConfigStore.install(org.apache.geronimo.kernel.config.ConfigurationData,
>  java.io.File) line: 269
>         
> org.apache.geronimo.system.configuration.LocalConfigStore$$FastClassByCGLIB$$ba31ca6b.invoke(int,
>  java.lang.Object, java.lang.Object[]) line: not available
>         <SNIP>
> The user will end up getting the following exception on the deploy command:
> org.apache.geronimo.kernel.config.InvalidConfigException: Could not extract 
> gbean data from configuration
>         at 
> org.apache.geronimo.kernel.config.ConfigurationManagerImpl.loadGBeans(ConfigurationManagerImpl.java:130)
>         at 
> org.apache.geronimo.kernel.config.ConfigurationManagerImpl$$FastClassByCGLIB$$fbed85d2.invoke(<generated>)
>        <SNIP>
> If you look at the geronimo\config-store\index.properties file, there is an 
> entry for the configuration that didn't deploy properly.  Also there is a 
> numbered config directory for the configuration that didn't deploy properly 
> under the geronimo\config-store directory.
> If the user then attempts to undeploy the application they get an error 
> similar to the following:
>     Error:
>     com.acme.myapp/1.0/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.
> This appears to be due to a NPE in NPE in 
> org.apache.geronimo.kernel.config.Configuration.unloadGBeans() Line 328.  
> This NPE gets caught by 
> org.apache.geronimo.kernel.config.EditableConfigurationManagerImpl.unload() 
> Line 231 and in turn a NoSuchConfigException("Problem unloading config: " 
> exception is thrown.
> Need to review in 1.1 branch.

-- 
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

Reply via email to