Error after upgrade to Confluence 5.1
Asked by Alastair Bain:

After upgrading from Confluence 4.3 to 5.1 Confluence no longer serves any content, and in the log I see the following:

2013-04-10 08:04:55,907 INFO \[main\] \[com.atlassian.confluence.lifecycle\] contextInitialized Starting Confluence 5.1 \[build 4215 based on commit hash 27aa6aff3fb0e9e5138a84da80ecdaa533a08846\]

2013-04-10 08:05:00,324 WARN \[main\] \[atlassian.config.xml.AbstractDom4jXmlConfigurationPersister\] saveDocumentAtomically Unable to move C:\\app_data\\confluence-data\\confluence.cfg.xml98604999481602495tmp to C:\\app_data\\confluence-data\\confluence.cfg.xml. Falling back to non-atomic overwrite.

2013-04-10 08:05:00,349 INFO \[main\] \[springframework.web.context.ContextLoader\] initWebApplicationContext Root WebApplicationContext: initialization started

2013-04-10 08:05:04,930 INFO \[main\] \[com.atlassian.confluence.lifecycle\] \<init\> Loading EhCache cache manager

2013-04-10 08:05:12,441 ERROR \[main\] \[springframework.web.context.ContextLoader\] initWebApplicationContext Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in class path resource \[services/pluginServiceContext.xml\]: Cannot resolve reference to bean 'bundledPluginLoader' while setting constructor argument with key \[57\]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bundledPluginLoader': FactoryBean threw exception on object creation; nested exception is java.io.FileNotFoundException: jndi:/localhost/confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:479)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

at java.security.AccessController.doPrivileged(Native Method)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)

at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)

at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

at com.atlassian.spring.container.ContainerContextLoaderListener.contextInitialized(ContainerContextLoaderListener.java:32)

at com.atlassian.confluence.setup.ConfluenceBootstrappedContextLoaderListener.contextInitialized(ConfluenceBootstrappedContextLoaderListener.java:28)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bundledPluginLoader': FactoryBean threw exception on object creation; nested exception is java.io.FileNotFoundException: jndi:/localhost/confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip

at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127)

at java.security.AccessController.doPrivileged(Native Method)

at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)

at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91)

at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)

... 40 more

Caused by: java.io.FileNotFoundException: jndi:/localhost/confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip

at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:365)

at java.net.URL.openStream(URL.java:1037)

at com.atlassian.plugin.util.zip.UrlUnzipper.entries(UrlUnzipper.java:47)

at com.atlassian.confluence.plugin.BundledPluginLoaderFactory.extractExtraPluginsFromZipToDirectory(BundledPluginLoaderFactory.java:128)

at com.atlassian.confluence.plugin.BundledPluginLoaderFactory.getObject(BundledPluginLoaderFactory.java:81)

at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)

... 48 more

2013-04-10 08:05:12,447 ERROR \[main\] \[atlassian.config.bootstrap.BootstrappedContextLoaderListener\] contextInitialized Failed to initialize the main Confluence context

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in class path resource \[services/pluginServiceContext.xml\]: Cannot resolve reference to bean 'bundledPluginLoader' while setting constructor argument with key \[57\]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bundledPluginLoader': FactoryBean threw exception on object creation; nested exception is java.io.FileNotFoundException: jndi:/localhost/confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:479)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

at java.security.AccessController.doPrivileged(Native Method)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)

at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)

at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

at com.atlassian.spring.container.ContainerContextLoaderListener.contextInitialized(ContainerContextLoaderListener.java:32)

at com.atlassian.confluence.setup.ConfluenceBootstrappedContextLoaderListener.contextInitialized(ConfluenceBootstrappedContextLoaderListener.java:28)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bundledPluginLoader': FactoryBean threw exception on object creation; nested exception is java.io.FileNotFoundException: jndi:/localhost/confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip

at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127)

at java.security.AccessController.doPrivileged(Native Method)

at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)

at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91)

at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)

... 40 more

Caused by: java.io.FileNotFoundException: jndi:/localhost/confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip

at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:365)

at java.net.URL.openStream(URL.java:1037)

at com.atlassian.plugin.util.zip.UrlUnzipper.entries(UrlUnzipper.java:47)

at com.atlassian.confluence.plugin.BundledPluginLoaderFactory.extractExtraPluginsFromZipToDirectory(BundledPluginLoaderFactory.java:128)

at com.atlassian.confluence.plugin.BundledPluginLoaderFactory.getObject(BundledPluginLoaderFactory.java:81)

at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)

... 48 more

2013-04-10 08:05:12,491 WARN \[main\] \[atlassian.confluence.upgrade.UpgradeLauncherServletContextListener\] contextInitialized Upgrades not attempted due to error in main spring context

2013-04-10 08:05:12,491 WARN \[main\] \[atlassian.confluence.plugin.PluginFrameworkContextListener\] contextInitialized Not starting full plugin system due to error in main spring context

2013-04-10 08:05:13,710 INFO \[main\] \[com.atlassian.confluence.lifecycle\] init Confluence is ready to serve


Answers:
author: Alastair Bain
body: The problem was caused by a missing forward slash in the server.xml file, element \<Context path="confluence" ... should have been \<Context path="/confluence" .

comments: author: Ryan Goodwin
body: Nice find for such a nondescript problem!


author: Ramiro Pointis
body: Hi, have you looked at this page?

<https://confluence.atlassian.com/pages/viewpage.action?pageId=251005962>

comments: author: Alastair Bain
body: Yes, it doesn't seem to relate to this problem. I've tried removing that folder and it made no difference.


author: License
body: Did you ever find a solution?