[jira] Updated: (GERONIMO-2269) Error after redeploy (with no version in module ID)

2006-08-03 Thread Aaron Mulder (JIRA)
 [ http://issues.apache.org/jira/browse/GERONIMO-2269?page=all ]

Aaron Mulder updated GERONIMO-2269:
---

Attachment: 2269-fix-jndi-while-reloading.patch

> Error after redeploy (with no version in module ID)
> ---
>
> Key: GERONIMO-2269
> URL: http://issues.apache.org/jira/browse/GERONIMO-2269
> Project: Geronimo
>  Issue Type: Bug
>  Security Level: public(Regular issues) 
>  Components: deployment, kernel
>Affects Versions: 1.1
>Reporter: Aaron Mulder
> Assigned To: Aaron Mulder
> Fix For: 1.1.1
>
> Attachments: 2269-fix-jndi-while-reloading.patch, 
> 2269-fix-jndi-while-reloading.patch
>
>
> I deployed a web application (including a resource-ref to a database pool) 
> successfully, with a module ID containing only an artifact element.
> I changed the web.xml and redeployed it.  It failed due to a syntax error in 
> web.xml (I changed the login page to not start with a / and it complained; 
> apparently the / is necessary).  The application still appeared to be 
> running, though I didn't test it.
> I fixed the web.xml and redeployed it.  It failed with the following error.  
> It seems that after the redeploy the JNDI entry for the data source was 
> invalid?
> UPDATE: a simple redeploy of the working application causes the error -- it's 
> not necessary to have the failed redeploy in between.
> 11:57:44,865 ERROR [ContextLoader] Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'DataSource' defined in resource [/WEB-INF/applicationContext.xml] 
> of ServletContext: Initialization of bean failed; nested exception is 
> javax.naming.NamingException: Could not look up : env/jdbc/Database
> javax.naming.NamingException: Could not look up : env/jdbc/Database [Root 
> exception is org.apache.geronimo.kernel.proxy.DeadProxyException: Proxy is no 
> longer valid]
> at 
> org.apache.geronimo.naming.enc.CachingReference.resolveReference(CachingReference.java:59)
> at 
> org.apache.geronimo.naming.enc.CachingReference.get(CachingReference.java:45)
> at 
> org.apache.geronimo.naming.enc.AbstractReadOnlyContext.lookup(AbstractReadOnlyContext.java:86)
> at 
> org.apache.geronimo.naming.java.RootContext.lookup(RootContext.java:51)
> at javax.naming.InitialContext.lookup(InitialContext.java:347)
> at 
> org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:120)
> at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
> at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:117)
> at 
> org.springframework.jndi.AbstractJndiLocator.lookup(AbstractJndiLocator.java:181)
> at 
> org.springframework.jndi.AbstractJndiLocator.afterPropertiesSet(AbstractJndiLocator.java:171)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:801)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:249)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177)
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
> at 
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:177)
> at 
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
> at 
> org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131)
> at 
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:156)
> at 
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:97)
> at 
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
> at 
> org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:495)
> at 
> org.apache.geronimo.jetty.JettyWebAppContext.doStart(JettyWebAppContext.java:401)
> at org.mortbay.util.Container.start(Container.java:72)
> at 
> org.apache.geronimo.jetty.JettyWebAppContext.doStart(JettyWebAppContext.java:389)
> 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)
>   

[jira] Updated: (GERONIMO-2269) Error after redeploy (with no version in module ID)

2006-08-03 Thread Aaron Mulder (JIRA)
 [ http://issues.apache.org/jira/browse/GERONIMO-2269?page=all ]

Aaron Mulder updated GERONIMO-2269:
---

  Summary: Error after redeploy (with no version in module ID)  
(was: Error after redeploy (with no version in module ID) (branches/1.1.1))
Fix Version/s: 1.1.1
   (was: 1.1.x)
Affects Version/s: 1.1
   (was: 1.1.1)
 Assignee: Aaron Mulder

Fixed in branches/1.1

Patch can be applied to branches/1.1.1


> Error after redeploy (with no version in module ID)
> ---
>
> Key: GERONIMO-2269
> URL: http://issues.apache.org/jira/browse/GERONIMO-2269
> Project: Geronimo
>  Issue Type: Bug
>  Security Level: public(Regular issues) 
>  Components: deployment, kernel
>Affects Versions: 1.1
>Reporter: Aaron Mulder
> Assigned To: Aaron Mulder
> Fix For: 1.1.1
>
> Attachments: 2269-fix-jndi-while-reloading.patch, 
> 2269-fix-jndi-while-reloading.patch
>
>
> I deployed a web application (including a resource-ref to a database pool) 
> successfully, with a module ID containing only an artifact element.
> I changed the web.xml and redeployed it.  It failed due to a syntax error in 
> web.xml (I changed the login page to not start with a / and it complained; 
> apparently the / is necessary).  The application still appeared to be 
> running, though I didn't test it.
> I fixed the web.xml and redeployed it.  It failed with the following error.  
> It seems that after the redeploy the JNDI entry for the data source was 
> invalid?
> UPDATE: a simple redeploy of the working application causes the error -- it's 
> not necessary to have the failed redeploy in between.
> 11:57:44,865 ERROR [ContextLoader] Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'DataSource' defined in resource [/WEB-INF/applicationContext.xml] 
> of ServletContext: Initialization of bean failed; nested exception is 
> javax.naming.NamingException: Could not look up : env/jdbc/Database
> javax.naming.NamingException: Could not look up : env/jdbc/Database [Root 
> exception is org.apache.geronimo.kernel.proxy.DeadProxyException: Proxy is no 
> longer valid]
> at 
> org.apache.geronimo.naming.enc.CachingReference.resolveReference(CachingReference.java:59)
> at 
> org.apache.geronimo.naming.enc.CachingReference.get(CachingReference.java:45)
> at 
> org.apache.geronimo.naming.enc.AbstractReadOnlyContext.lookup(AbstractReadOnlyContext.java:86)
> at 
> org.apache.geronimo.naming.java.RootContext.lookup(RootContext.java:51)
> at javax.naming.InitialContext.lookup(InitialContext.java:347)
> at 
> org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:120)
> at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
> at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:117)
> at 
> org.springframework.jndi.AbstractJndiLocator.lookup(AbstractJndiLocator.java:181)
> at 
> org.springframework.jndi.AbstractJndiLocator.afterPropertiesSet(AbstractJndiLocator.java:171)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:801)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:249)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177)
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
> at 
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:177)
> at 
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
> at 
> org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131)
> at 
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:156)
> at 
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:97)
> at 
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
> at 
> org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:495)
> at 
> org.apache.geronimo.jetty.JettyWebAppContext.doStart(JettyWebAppContext.java:401)
> at org.mortbay.util.Container.start(Container.java:72)
> at 
> org.apache.geronimo.jetty.JettyWebAppContext.doStart(JettyWebAppContext.jav

[jira] Updated: (GERONIMO-2269) Error after redeploy (with no version in module ID) (branches/1.1.1)

2006-08-03 Thread Aaron Mulder (JIRA)
 [ http://issues.apache.org/jira/browse/GERONIMO-2269?page=all ]

Aaron Mulder updated GERONIMO-2269:
---

Attachment: 2269-fix-jndi-while-reloading.patch

Problem finally was that the ConfigurationModel thinks that the new 
Configuration being reloaded was still in the "unloaded" state until after the 
reload completed.  That meant that any ConfigurationAwareReferences failed, 
because when they tried to get their configuration (which had, in truth, been 
loaded and was starting) they were told it didn't exist.

Patch fixes this by adding a placeholder for the "currently reloading 
configuration" (one that's in process and has been loaded but may or may not be 
started).  This is safe because all the SimpleConfigurationManager methods are 
synchronized.  Now isLoaded and getConfiguration check the currently reloading 
configuration as well as the ConfigurationModel.  (It would have been more 
complex to keep the ConfigurationModel continuously updated with the state of 
the Configurations being loaded, etc.)

> Error after redeploy (with no version in module ID) (branches/1.1.1)
> 
>
> Key: GERONIMO-2269
> URL: http://issues.apache.org/jira/browse/GERONIMO-2269
> Project: Geronimo
>  Issue Type: Bug
>  Security Level: public(Regular issues) 
>  Components: deployment, kernel
>Affects Versions: 1.1.1
>Reporter: Aaron Mulder
> Fix For: 1.1.x
>
> Attachments: 2269-fix-jndi-while-reloading.patch
>
>
> I deployed a web application (including a resource-ref to a database pool) 
> successfully, with a module ID containing only an artifact element.
> I changed the web.xml and redeployed it.  It failed due to a syntax error in 
> web.xml (I changed the login page to not start with a / and it complained; 
> apparently the / is necessary).  The application still appeared to be 
> running, though I didn't test it.
> I fixed the web.xml and redeployed it.  It failed with the following error.  
> It seems that after the redeploy the JNDI entry for the data source was 
> invalid?
> UPDATE: a simple redeploy of the working application causes the error -- it's 
> not necessary to have the failed redeploy in between.
> 11:57:44,865 ERROR [ContextLoader] Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'DataSource' defined in resource [/WEB-INF/applicationContext.xml] 
> of ServletContext: Initialization of bean failed; nested exception is 
> javax.naming.NamingException: Could not look up : env/jdbc/Database
> javax.naming.NamingException: Could not look up : env/jdbc/Database [Root 
> exception is org.apache.geronimo.kernel.proxy.DeadProxyException: Proxy is no 
> longer valid]
> at 
> org.apache.geronimo.naming.enc.CachingReference.resolveReference(CachingReference.java:59)
> at 
> org.apache.geronimo.naming.enc.CachingReference.get(CachingReference.java:45)
> at 
> org.apache.geronimo.naming.enc.AbstractReadOnlyContext.lookup(AbstractReadOnlyContext.java:86)
> at 
> org.apache.geronimo.naming.java.RootContext.lookup(RootContext.java:51)
> at javax.naming.InitialContext.lookup(InitialContext.java:347)
> at 
> org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:120)
> at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
> at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:117)
> at 
> org.springframework.jndi.AbstractJndiLocator.lookup(AbstractJndiLocator.java:181)
> at 
> org.springframework.jndi.AbstractJndiLocator.afterPropertiesSet(AbstractJndiLocator.java:171)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:801)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:249)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177)
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
> at 
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:177)
> at 
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
> at 
> org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131)
> at 
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:156)
> at 
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextL

[jira] Updated: (GERONIMO-2269) Error after redeploy (with no version in module ID) (branches/1.1.1)

2006-08-03 Thread Aaron Mulder (JIRA)
 [ http://issues.apache.org/jira/browse/GERONIMO-2269?page=all ]

Aaron Mulder updated GERONIMO-2269:
---

Summary: Error after redeploy (with no version in module ID) 
(branches/1.1.1)  (was: Error after failed redeploy with no version in module 
ID (branches/1.1.1))
Description: 
I deployed a web application (including a resource-ref to a database pool) 
successfully, with a module ID containing only an artifact element.

I changed the web.xml and redeployed it.  It failed due to a syntax error in 
web.xml (I changed the login page to not start with a / and it complained; 
apparently the / is necessary).  The application still appeared to be running, 
though I didn't test it.

I fixed the web.xml and redeployed it.  It failed with the following error.  It 
seems that after the redeploy the JNDI entry for the data source was invalid?

UPDATE: a simple redeploy of the working application causes the error -- it's 
not necessary to have the failed redeploy in between.

11:57:44,865 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'DataSource' defined in resource [/WEB-INF/applicationContext.xml] of 
ServletContext: Initialization of bean failed; nested exception is 
javax.naming.NamingException: Could not look up : env/jdbc/Database
javax.naming.NamingException: Could not look up : env/jdbc/Database [Root 
exception is org.apache.geronimo.kernel.proxy.DeadProxyException: Proxy is no 
longer valid]
at 
org.apache.geronimo.naming.enc.CachingReference.resolveReference(CachingReference.java:59)
at 
org.apache.geronimo.naming.enc.CachingReference.get(CachingReference.java:45)
at 
org.apache.geronimo.naming.enc.AbstractReadOnlyContext.lookup(AbstractReadOnlyContext.java:86)
at 
org.apache.geronimo.naming.java.RootContext.lookup(RootContext.java:51)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at 
org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:120)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:117)
at 
org.springframework.jndi.AbstractJndiLocator.lookup(AbstractJndiLocator.java:181)
at 
org.springframework.jndi.AbstractJndiLocator.afterPropertiesSet(AbstractJndiLocator.java:171)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:801)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:249)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:177)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
at 
org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131)
at 
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:156)
at 
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:97)
at 
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
at 
org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:495)
at 
org.apache.geronimo.jetty.JettyWebAppContext.doStart(JettyWebAppContext.java:401)
at org.mortbay.util.Container.start(Container.java:72)
at 
org.apache.geronimo.jetty.JettyWebAppContext.doStart(JettyWebAppContext.java:389)
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.GBeanInstance.start(GBeanInstance.java:526)
at 
org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:111)
at 
org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146)
at 
org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120)
at 
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:173)
at 
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.jav