on ‎2018 Aug 08 6:18 AM
Hi All,
I'm upgrading Hybris 6.4 to 6.5 and I'm encountering this error creating bean.
[java] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultInterceptorRegistry' defined in class path resource [interceptor-spring.xml]: Unsatisfied dependency expressed through bean property 'interceptorMappings'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmsAbstractPageRemoveInterceptorMapping' defined in class path resource [cms2-spring.xml]: Cannot resolve reference to bean 'cmsAbstractPageRemoveInterceptor' while setting bean property 'interceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmsAbstractPageRemoveInterceptor' defined in class path resource [cms2-spring.xml]: Cannot resolve reference to bean 'cmsContentSlotService' while setting bean property 'cmsContentSlotService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultCMSContentSlotService' defined in class path resource [cms2-spring.xml]: Cannot resolve reference to bean 'cmsRestrictionService' while setting bean property 'cmsRestrictionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rankingCMSRestrictionService' defined in class path resource [acceleratorcms-spring.xml]: Cannot resolve reference to bean 'cmsRestrictionEvaluatorRegistry' while setting bean property 'evaluatorRegistry'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmsRestrictionEvaluatorRegistry' defined in class path resource [cms2-spring.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'assistedServiceSessionRestrictionEvaluatorMapping' defined in class path resource [assistedservicestorefront-spring.xml]: Cannot resolve reference to bean 'assistedServiceSessionRestrictionEvaluator' while setting bean property 'restrictionEvaluator'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'assistedServiceSessionRestrictionEvaluator' defined in class path resource [assistedservicestorefront-spring.xml]: Cannot resolve reference to bean 'assistedServiceFacade' while setting bean property 'defaultAssistedServiceFacade'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sigmaAssistedServiceFacade' defined in class path resource [sigmafacades-spring.xml]: Cannot resolve reference to bean 'assistedServiceService' while setting bean property 'assistedServiceService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sigmaAssistedServiceService' defined in class path resource [sigmacore-spring.xml]: Cannot resolve reference to bean 'commerceCartService' while setting bean property 'commerceCartService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultCommerceCartService' defined in class path resource [commerceservices-spring.xml]: Cannot resolve reference to bean 'cartValidationStrategy' while setting bean property 'cartValidationStrategy'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sigmaCartValidationStrategy': Unsatisfied dependency expressed through field 'b2BUnitService'; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'de.hybris.platform.b2b.services.B2BUnitService' available: expected single matching bean but found 2: defaultB2BUnitService,b2bUnitServiceProxy
Request clarification before answering.
The customized sigmaCartValidationStrategy has a dependency on the "b2BUnitService" bean.
In the out-of-the-box b2bapprovalprocess extension, this bean ID is aliased to the bean "b2bUnitServiceProxy", which is of class "de.hybris.platform.b2b.services.impl.B2BUnitServiceProxy", not "de.hybris.platform.b2b.services.B2BUnitService". Hence, the error. I'm not sure when this alias was introduced. Probably in 6.5 given your upgrade.
One possible fix is to modify "sigmaCartValidationStrategy" to depend instead on the "defaultB2BUnitService" bean.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how to fix this issue any one help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.