「NoSuchBeanDefinitionException」により、アップグレード後に Confluence を起動できない
プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム。
この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。
*Fisheye および Crucible は除く
症状
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
原因
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.
ソリューション
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.
この内容はお役に立ちましたか?