Confluence fails to start after upgrade due to 'NoSuchBeanDefinitionException'

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

After completing the instructions Upgrading Confluence, Confluence fails to start with a NoSuchBeanDefinitionException exception:

011-04-08 19:12:32,577 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 'pluginStateStore' while setting constructor argument with index 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginStateStore' defined in class path resource [services/pluginServiceContext.xml]: Cannot resolve reference to bean 'bandanaManager' while setting bean property 'bandanaManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bandanaManager' defined in class path resource [services/bandanaServiceContext.xml]: Cannot resolve reference to bean 'bandanaPersister' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bandanaPersister' defined in class path resource [services/bandanaServiceContext.xml]: Cannot resolve reference to bean 'transactionalCacheFactory' while setting bean property 'cacheFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionalCacheFactory' defined in class path resource [services/cacheServiceContext.xml]: Cannot resolve reference to bean 'cacheManager' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' is defined
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginStateStore' defined in class path resource [services/pluginServiceContext.xml]: Cannot resolve reference to bean 'bandanaManager' while setting bean property 'bandanaManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bandanaManager' defined in class path resource [services/bandanaServiceContext.xml]: Cannot resolve reference to bean 'bandanaPersister' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bandanaPersister' defined in class path resource [services/bandanaServiceContext.xml]: Cannot resolve reference to bean 'transactionalCacheFactory' while setting bean property 'cacheFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionalCacheFactory' defined in class path resource [services/cacheServiceContext.xml]: Cannot resolve reference to bean 'cacheManager' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' is defined
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bandanaManager' defined in class path resource [services/bandanaServiceContext.xml]: Cannot resolve reference to bean 'bandanaPersister' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bandanaPersister' defined in class path resource [services/bandanaServiceContext.xml]: Cannot resolve reference to bean 'transactionalCacheFactory' while setting bean property 'cacheFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionalCacheFactory' defined in class path resource [services/cacheServiceContext.xml]: Cannot resolve reference to bean 'cacheManager' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' is defined
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bandanaPersister' defined in class path resource [services/bandanaServiceContext.xml]: Cannot resolve reference to bean 'transactionalCacheFactory' while setting bean property 'cacheFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionalCacheFactory' defined in class path resource [services/cacheServiceContext.xml]: Cannot resolve reference to bean 'cacheManager' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' is defined
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionalCacheFactory' defined in class path resource [services/cacheServiceContext.xml]: Cannot resolve reference to bean 'cacheManager' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' is defined
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' is defined

Cause

The previous version's web.xml file was copied manually. With new versions of Confluence the web.xml will be updated with new spring contexts. 
If you copy an old version of the web.xml file, it will be missing these contexts and you would get the above error. 

Resolution

If you have customized your web.xml, instead of replacing the web.xml, edit the default web.xml and apply your customizations to the new install's default web.xml file.

Last modified on Jan 2, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.