cancel
Showing results for 
Search instead for 
Did you mean: 

2211.10 server start on local dev environment failing

pbresson
Explorer

Hello,

I’m tryng to ugprade to 2211.10 release. 

On local dev environment (M2 PRO mac), build and initialization are going fine, however, trying to star the serer locally raised the following error: 

WARN [localhost-startStop-1] [TenantIgnoreXmlWebApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultStorefrontTenantDefaultFilterChainList': Cannot resolve reference to bean 'cmsSiteFilter' while setting bean property 'sourceList' with key [7]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmsSiteFilter' defined in ServletContext resource [/WEB-INF/config/spring-filter-config.xml]: Cannot resolve reference to bean 'contextInformationLoader' while setting bean property 'contextInformationLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextInformationLoader' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Cannot resolve reference to bean 'contextLoadStrategiesList' while setting bean property 'strategies'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextLoadStrategiesList': Cannot create inner bean 'loadUserStrategy' of type [de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader$LoadUserStrategy] while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadUserStrategy' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'jdk.proxy10.$Proxy308 implementing java.util.List' to required type 'java.util.List' for property 'strategies'; nested exception is java.lang.IllegalStateException: Singleton instance not initialized yetERROR [localhost-startStop-1] [ContextLoader] Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultStorefrontTenantDefaultFilterChainList': Cannot resolve reference to bean 'cmsSiteFilter' while setting bean property 'sourceList' with key [7]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmsSiteFilter' defined in ServletContext resource [/WEB-INF/config/spring-filter-config.xml]: Cannot resolve reference to bean 'contextInformationLoader' while setting bean property 'contextInformationLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextInformationLoader' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Cannot resolve reference to bean 'contextLoadStrategiesList' while setting bean property 'strategies'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextLoadStrategiesList': Cannot create inner bean 'loadUserStrategy' of type [de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader$LoadUserStrategy] while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadUserStrategy' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'jdk.proxy10.$Proxy308 implementing java.util.List' to required type 'java.util.List' for property 'strategies'; nested exception is java.lang.IllegalStateException: Singleton instance not initialized yet at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:428) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:173) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1707) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1452) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:936) ~[spring-beans-5.3.29.jar:5.3.29] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:921) ~[spring-context-5.3.29.jar:5.3.29] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.29.jar:5.3.29] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:399) ~[spring-web-5.3.29.jar:5.3.29] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:278) ~[spring-web-5.3.29.jar:5.3.29] at de.hybris.platform.spring.HybrisContextLoaderListener.doInitWebApplicationContext(HybrisContextLoaderListener.java:226) ~[coreserver.jar:?] at de.hybris.platform.spring.HybrisContextLoaderListener.initWebApplicationContext(HybrisContextLoaderListener.java:199) ~[coreserver.jar:?] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103) ~[spring-web-5.3.29.jar:5.3.29] at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitializedInternal(HybrisContextLoaderListener.java:96) ~[coreserver.jar:?] at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitialized(HybrisContextLoaderListener.java:91) ~[coreserver.jar:?] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4492) ~[catalina.jar:8.5.89] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4950) ~[catalina.jar:8.5.89] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:8.5.89] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1362) ~[catalina.jar:8.5.89] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1352) ~[catalina.jar:8.5.89] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?]Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmsSiteFilter' defined in ServletContext resource [/WEB-INF/config/spring-filter-config.xml]: Cannot resolve reference to bean 'contextInformationLoader' while setting bean property 'contextInformationLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextInformationLoader' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Cannot resolve reference to bean 'contextLoadStrategiesList' while setting bean property 'strategies'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextLoadStrategiesList': Cannot create inner bean 'loadUserStrategy' of type [de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader$LoadUserStrategy] while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadUserStrategy' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Initialization of bean failed; nested exception is

......



Aug 17, 2023 4:16:07 PM org.apache.catalina.core.StandardContext startInternalSEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log fileAug 17, 2023 4:16:07 PM org.apache.catalina.core.StandardContext startInternal

....

Previous ugrade to 2211.9 went just fine and I didn’t any things in 2211.10 upgrade instruction.

Any hint on this ?  Thanks in advance.

adambadura
Participant
0 Kudos

Hi, I think that you need to look at the root cause - the stacktrace that you posted is not complete and probably the actual error lurks somewhere at the end of it.

pbresson
Explorer
0 Kudos

adambadu,

The stack trace is pretty long and for the moment it’s hard to figure out the real issue.

A colleague of mine is facing a similar issue with a different code base trying to update to 2205.15 release. On an intel based Mac this time. 

We’re investigating in this is linked to spring update to version 5.3.29.

pbresson
Explorer
0 Kudos
Trying to root cause here is the error chain: INFO | jvm 1 | main | 2023/08/22 18:51:39.356 | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultStorefrontTenantDefaultFilterChainList': Cannot resolve reference to bean 'cmsSiteFilter' while setting bean property 'sourceList' with key [7]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmsSiteFilter' defined in ServletContext resource [/WEB-INF/config/spring-filter-config.xml]: Cannot resolve reference to bean 'contextInformationLoader' while setting bean property 'contextInformationLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextInformationLoader' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Cannot resolve reference to bean 'contextLoadStrategiesList' while setting bean property 'strategies'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextLoadStrategiesList': Cannot create inner bean 'loadUserStrategy' of type [de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader$LoadUserStrategy] while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadUserStrategy' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'jdk.proxy10.$Proxy304 implementing java.util.List' to required type 'java.util.List' for property 'strategies'; nested exception is java.lang.IllegalStateException: Singleton instance not initialized yet
The fragment causing the problem, coming from the bean def in core-accelerator/acceleratorcms/resources/acceleratorcms/spring/web-spring-context.xml <!-- Custom CMS Component Renderers --> <alias alias="cmsParagraphComponentRenderer" name="defaultCMSParagraphComponentRenderer" /> <bean id="defaultCMSParagraphComponentRenderer" class="de.hybris.platform.acceleratorcms.component.renderer.impl.CMSParagraphComponentRenderer" /> <!-- Context information loader - bean that load context information --> <alias name="defaultContextInformationLoader" alias="contextInformationLoader" /> <bean id="defaultContextInformationLoader" class="de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader"> <property name="baseSiteService" ref="baseSiteService" /> <property name="cmsSiteService" ref="cmsSiteService" /> <property name="i18NService" ref="i18NService" /> <property name="modelService" ref="modelService" /> <property name="timeService" ref="timeService" /> <property name="userService" ref="userService" /> <property name="strategies" ref="contextLoadStrategiesList" /> <property name="previewRequestStrategies" ref="previewRequestStrategiesList" /> <property name="commonI18NService" ref="commonI18NService" /> </bean> <alias name="defaultContextLoadStrategiesList" alias="contextLoadStrategiesList" /> <util:list id="defaultContextLoadStrategiesList "> <bean id="loadUserStrategy" parent="defaultContextInformationLoader" class="de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader$LoadUserStrategy" /> <bean id="loadUserGroupStrategy" parent="defaultContextInformationLoader" class="de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader$LoadUserGroupStrategy" /> <bean id="loadLanguageStrategy" parent="defaultContextInformationLoader" class="de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader$LoadLanguageStrategy" /> <bean id="loadDateStrategy" parent="defaultContextInformationLoader" class="de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader$LoadDateStrategy" /> </util:list>However there is nothing specifically different there compared to version 2211.9 (using spring 5.3.27)
pbresson
Explorer
0 Kudos
I got a second close issues later in log file: Error creating bean with name 'defaultFlexibleSearchConditionsAdapters': Cannot resolve reference to bean 'flexibleSearchUncategorizedConditionAdapter' while setting bean property 'sourceList' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultFlexibleSearchUncategorizedConditionAdapter' defined in ServletContext resource [/WEB-INF/backoffice-web-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'jdk.proxy19.$Proxy358 implementing java.util.List' to required type 'java.util.List' for property 'conditionsAdapters'; nested exception is java.lang.IllegalStateException: Singleton instance not initialized yetand the named fragment : modules/back-office-framework/backoffice/web/webroot/WEB-INF/backoffice-web-spring.xml <alias name="defaultFlexibleSearchUncategorizedConditionAdapter" alias="flexibleSearchUncategorizedConditionAdapter"/> <bean id="defaultFlexibleSearchUncategorizedConditionAdapter" class="com.hybris.backoffice.widgets.searchadapters.conditions.products.FlexibleSearchUncategorizedConditionAdapter"> <property name="conditionsAdapters" ref="flexibleSearchConditionsAdapters"/> </bean> <alias name="defaultFlexibleSearchClassificationSystemConditionAdapter" alias="flexibleSearchClassificationSystemConditionAdapter"/> <bean id="defaultFlexibleSearchClassificationSystemConditionAdapter" class="com.hybris.backoffice.widgets.searchadapters.conditions.products.FlexibleSearchClassificationSystemConditionAdapter"> <property name="classificationSystemVersionPropertyName" value="#{T(de.hybris.platform.core.model.product.ProductModel).SUPERCATEGORIES}"/> <property name="operator" value="#{T(com.hybris.cockpitng.search.data.ValueComparisonOperator).CONTAINS}"/> </bean> <alias name="defaultFlexibleSearchClassificationSystemVersionConditionAdapter" alias="flexibleSearchClassificationSystemVersionConditionAdapter"/> <bean id="defaultFlexibleSearchClassificationSystemVersionConditionAdapter" class="com.hybris.backoffice.widgets.searchadapters.conditions.products.FlexibleSearchClassificationSystemVersionConditionAdapter"> <property name="classificationSystemVersionPropertyName" value="#{T(de.hybris.platform.core.model.product.ProductModel).SUPERCATEGORIES}"/> <property name="operator" value="#{T(com.hybris.cockpitng.search.data.ValueComparisonOperator).CONTAINS}"/> </bean> <alias name="defaultFlexibleSearchCatalogConditionAdapter" alias="flexibleSearchCatalogConditionAdapter"/> <bean id="defaultFlexibleSearchCatalogConditionAdapter" class="com.hybris.backoffice.widgets.searchadapters.conditions.products.FlexibleSearchCatalogConditionAdapter"> <property name="catalogVersionPropertyName" value="#{T(de.hybris.platform.core.model.product.ProductModel).CATALOGVERSION}"/> <property name="operator" value="#{T(com.hybris.cockpitng.search.data.ValueComparisonOperator).EQUALS}"/> </bean> <alias name="defaultFlexibleSearchCatalogVersionConditionAdapter" alias="flexibleSearchCatalogVersionConditionAdapter"/> <bean id="defaultFlexibleSearchCatalogVersionConditionAdapter" class="com.hybris.backoffice.widgets.searchadapters.conditions.products.CatalogVersionConditionAdapter"> <property name="catalogVersionPropertyName" value="#{T(de.hybris.platform.core.model.product.ProductModel).CATALOGVERSION}"/> <property name="operator" value="#{T(com.hybris.cockpitng.search.data.ValueComparisonOperator).EQUALS}"/> </bean> <alias name="defaultFlexibleSearchProductInCategoriesConditionAdapter" alias="flexibleSearchProductInCategoriesConditionAdapter"/> <bean id="defaultFlexibleSearchProductInCategoriesConditionAdapter" class="com.hybris.backoffice.widgets.searchadapters.conditions.products.ProductInCategoryConditionAdapter"/> <alias name="defaultFlexibleSearchConditionsAdapters" alias="flexibleSearchConditionsAdapters"/> <util:list id="defaultFlexibleSearchConditionsAdapters" value-type="com.hybris.backoffice.widgets.searchadapters.conditions.SearchConditionAdapter"> <ref bean="flexibleSearchAllCatalogsConditionAdapter"/> <ref bean="flexibleSearchUncategorizedConditionAdapter"/> <ref bean="flexibleSearchClassificationSystemConditionAdapter"/> <ref bean="flexibleSearchClassificationSystemVersionConditionAdapter"/> <ref bean="flexibleSearchCatalogConditionAdapter"/> <ref bean="flexibleSearchCatalogVersionConditionAdapter"/> <ref bean="flexibleSearchProductInCategoriesConditionAdapter"/> </util:list>Something wrong with <util:list> support changes ? 
0 Kudos

pbresson I'm facing the same issue here also for 2211.10. I installed the OOTB accelerator for powertools and unfortunately that issue does not happen there, there the server starts with no error messages.

pbresson
Explorer
0 Kudos

hybriscoder , I also see that with an OOTB instance with a generated module, there is no such error.

pbresson
Explorer
0 Kudos

Here are some screenshot of the error : occurs only one time

fodiloglu-a
Explorer
0 Kudos

"When examining the log file, I see that the error is generally originating from core files, and in this case, it could also be due to extensions. I suspect there might be a missing extension or a non-functioning extension. Have you tried rebuilding by correctly configuring the addons using build.gradle?"

pbresson
Explorer
0 Kudos

Hey fodiloglu-a,

I suspect the same thing, without being able so far to identify which one.
Regarding rebuilding, as you mentioned, not sure to cope what you’re referring to.
Indeed, I have a customized accelerator extension, I’m adding to vanilla distro before building and initializing. Went always fine when upgrading to 2205 then 2211 version, but for some reason the last flavor of these versions raised the error.

I’ve pathed some bean xml adding list-class="java.util.ArrayList" to the bean definition and this time the conversion error went away but the following rise: 

No such bean exption :

fodiloglu-a
Explorer
0 Kudos

In my opinion, I suspect that there might have been some things deleted related to the OOTB extension. Apart from this, have you deleted anything related to the assistedservicestorefront extension?

sebauer
Explorer

Hello,

we are also facing that issue when upgrading from 2205.14 to 2205.15. With 2205.14 all was working fine and with the new patch we are getting this error during startup.

When looking at the code is seems that there is a hidden circular dependency between singleton which worked on 5.3.27 spring but not with 5.3.29:

when you look at the screenshot:


you can see that the defaultContextInformationLoader depends on the contextLoadStrategiesList which in turn contains singleton beans which have defaultContextInformationLoader as parent. Which adds a circular dependency.

maybe spring added some change with .29 which do not allow such constructs any more and now fail. If you patch the code to have the defaultContextLoadStrategyList prototype scope you will get a circular dependency error.

2023-08-23 15:46:10,065 ERROR org.springframework.web.context.ContextLoader o.s.w.c.ContextLoader [localhost-startStop-1]  Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultStorefrontTenantDefaultFilterChainList': Cannot resolve reference to bean 'cmsSiteFilter' while setting bean property 'sourceList' with key [4]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmsSiteFilter' defined in ServletContext resource [/WEB-INF/config/spring-filter-config.xml]: Cannot resolve reference to bean 'contextInformationLoader' while setting bean property 'contextInformationLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextInformationLoader' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Cannot resolve reference to bean 'contextLoadStrategiesList' while setting bean property 'strategies'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextLoadStrategiesList': Cannot create inner bean 'loadUserStrategy' of type [de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader$LoadUserStrategy] while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadUserStrategy' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Cannot resolve reference to bean 'contextLoadStrategiesList' while setting bean property 'strategies'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'defaultContextLoadStrategiesList': Requested bean is currently in creation: Is there an unresolvable circular reference?
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:428) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:173) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1707) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1452) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:936) ~[spring-beans-5.3.29.jar:5.3.29]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:921) ~[spring-context-5.3.29.jar:5.3.29]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.29.jar:5.3.29]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:399) ~[spring-web-5.3.29.jar:5.3.29]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:278) ~[spring-web-5.3.29.jar:5.3.29]
at de.hybris.platform.spring.HybrisContextLoaderListener.doInitWebApplicationContext(HybrisContextLoaderListener.java:226) ~[coreserver.jar:?]
at de.hybris.platform.spring.HybrisContextLoaderListener.initWebApplicationContext(HybrisContextLoaderListener.java:199) ~[coreserver.jar:?]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103) ~[spring-web-5.3.29.jar:5.3.29]
at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitializedInternal(HybrisContextLoaderListener.java:96) ~[coreserver.jar:?]
at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitialized(HybrisContextLoaderListener.java:91) ~[coreserver.jar:?]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4492) ~[catalina.jar:8.5.89]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4950) ~[catalina.jar:8.5.89]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:8.5.89]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1362) ~[catalina.jar:8.5.89]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1352) ~[catalina.jar:8.5.89]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmsSiteFilter' defined in ServletContext resource [/WEB-INF/config/spring-filter-config.xml]: Cannot resolve reference to bean 'contextInformationLoader' while setting bean property 'contextInformationLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextInformationLoader' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Cannot resolve reference to bean 'contextLoadStrategiesList' while setting bean property 'strategies'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultContextLoadStrategiesList': Cannot create inner bean 'loadUserStrategy' of type [de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader$LoadUserStrategy] while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadUserStrategy' defined in class path resource [acceleratorcms/spring/web-spring-context.xml]: Cannot resolve reference to bean 'contextLoadStrategiesList' while setting bean property 'strategies'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'defaultContextLoadStrategiesList': Requested bean is currently in creation: Is there an unresolvable circular reference?


In our project we have the same issue also for other list beans, f.e solrSearchConditionsAdapters (backofficesolrsearch-backoffice-spring.xml) and defaultFullTextSearchConditionsAdapters (backoffice-web-spring.xml).
for both beans we are getting similar errors when starting the system and the corresponding list contains beans which also require the list as dependencies.

0 Kudos

sebauer I had the same idea but then, how can you explain that OOTB it works for the powertools accelerator? OOTB the server starts without any errors.

sebauer
Explorer
0 Kudos

hybriscoder: I cannot explain that and I wonder that it seem to work OOTB with the powertools accelerator. I'm continuing investigation. According to some internet research this kind of dependency should work with setter injection despite that its not the best implementation design and it apparently was also working until 2205.15 without issue on our end as well.

I will see what I additionally can find out.

0 Kudos

pbresson, sebauer I haven't found the reason why but I have a workaround. Not nice though but here we go.

- Comment out the beans with the alias contextInformationLoader and contextLoadStrategiesList and update them with ant customize

- Create a bean that does almost the same that contextInformationLoader, basically a copy paste but without the strategies dependencies and without the four inner classes.

- The method loadFakeContextInformation looks like this:

@Override

public void loadFakeContextInformation(final HttpServletRequest httpRequest, final PreviewDataModel previewData)

{

List<PreviewContextInformationLoaderStrategy> strategies = new ArrayList<>();

PreviewContextInformationLoaderStrategy loadUserStrategy = (PreviewDataModel previewDataModel) -> loadFakeUser(previewDataModel.getUser());

PreviewContextInformationLoaderStrategy loadUserGroupStrategy = (PreviewDataModel previewDataModel) -> loadFakeUserGroup(previewDataModel);

PreviewContextInformationLoaderStrategy loadLanguageStrategy = (PreviewDataModel previewDataModel) -> loadFakeLanguage(previewDataModel.getLanguage());

PreviewContextInformationLoaderStrategy loadDateStrategy = (PreviewDataModel previewDataModel) -> loadFakeDate(previewDataModel.getTime());

strategies.add(loadUserStrategy);

strategies.add(loadUserGroupStrategy);

strategies.add(loadLanguageStrategy);

strategies.add(loadDateStrategy);

initializePreviewContextStrategies(strategies, previewData);

storePreviewTicketIDWithinSession(httpRequest);

}

0 Kudos

pbresson, sebauer another way to get rid of this error message is by downgrading spring from 5.3.29 to 5.3.27

sebauer
Explorer
sebauer
Explorer
0 Kudos

FYI: spring released a new version 5.3.30 with a fix: https://github.com/spring-projects/spring-framework/releases/tag/v5.3.30. Would be nice to see that integrated in the next patch 🙂

pbresson
Explorer
0 Kudos

Hey,

I upgraded the spring-framework to 5.3.30 on my local 2211.10  environment and confirmed it fixes the problem.

For deployment into the cloud, means for us that until upgrade to 5.3.30 in a later release or a downgrade to 5.3.27 no other option than stay on the 2211.09.

pbresson
Explorer
0 Kudos

Problem still persists with 2211.12 release.

pbresson
Explorer
0 Kudos

Problem solved with 2211.13 release.Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

fodiloglu-a
Explorer
0 Kudos

I do not fully understand the error, but it may be caused by your computer's operating system. Can you run the same project on linux?

sebauer
Explorer
0 Kudos

I have the same issue here with 2205 on a linux environment (Ubuntu 22.04, SAP maching 17.0.8). So seem not to be a OS issue

fodiloglu-a
Explorer
0 Kudos

Can you share me a screenshot of the first and last place of the error?