Skip to Content
1
Jan 28, 2021 at 05:38 AM

Hybris upgradation from 1808 to 2011 : No bean named 'restTemplate' available

241 Views Last edit Jan 28, 2021 at 05:42 AM 2 rev

We are getting below error while server start. Even though required(spring-web-5.2.9.RELEASE.jar) jar is available under platform folder.

INFO [localhost-startStop-7] [DefaultCacheController] Registered Listener de.hybris.platform.media.storage.impl.DefaultLocalMediaFileCacheService$MediaCacheLifecycleCallback@29e6fb34 on cache controller. Currently registered 1 INFO [localhost-startStop-7] [HybrisSpringSessionFilter] Hybris Spring Session filter disabled INFO [localhost-startStop-7] [Reflections] Reflections took 363 ms to scan 1 urls, producing 9 keys and 16 values INFO [localhost-startStop-7] [Reflections] Reflections took 1 ms to scan 1 urls, producing 2 keys and 5 values INFO [localhost-startStop-7] [ListMergeDirectiveBeanPostProcessor] Post Processing ListMergeDirective [priceProcessorsMergeDirective] on Bean [defaultPriceProcessors] INFO [localhost-startStop-7] [ListMergeDirectiveBeanPostProcessor] Post Processing ListMergeDirective [discountProcessorsMergeDirective] on Bean [defaultDiscountProcessors] INFO [localhost-startStop-7] [ListMergeDirectiveBeanPostProcessor] Post Processing ListMergeDirective [taxProcessorsMergeDirective] on Bean [defaultTaxProcessors] INFO [localhost-startStop-7] [PricingCustomizationDetector] PDT smart calculation mode is enabled (pdt.calculation.mode=smart). This setting is not recommended for production environment. WARN [localhost-startStop-7] [CloseAwareApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: 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 'removeDiscountsOnCurrencyRemoveMapping' defined in class path resource [order-spring.xml]: Cannot resolve reference to bean 'removeDiscountsOnCurrencyRemovalInterceptor' while setting bean property 'interceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'removeDiscountsOnCurrencyRemovalInterceptor' defined in class path resource [order-spring.xml]: Cannot resolve reference to bean 'discountService' while setting bean property 'discountService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultDiscountService' defined in class path resource [order-spring.xml]: Cannot resolve reference to bean 'findDiscountValuesStrategy' while setting bean property 'findDiscountValuesStrategy'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'findPDTValuesInformationsSwitcher' defined in class path resource [order-spring.xml]: Cannot resolve reference to bean 'findDeliveryCostStrategy' while setting bean property 'findDeliveryCostStrategy'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customWdFindDeliveryCostStrategy': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customWdDeliveryCostHelper': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customWdUpsRatingService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'restTemplate' available ERROR [localhost-startStop-7] [HybrisContextFactory] Error initializing global application context! 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 'removeDiscountsOnCurrencyRemoveMapping' defined in class path resource [order-spring.xml]: Cannot resolve reference to bean 'removeDiscountsOnCurrencyRemovalInterceptor' while setting bean property 'interceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'removeDiscountsOnCurrencyRemovalInterceptor' defined in class path resource [order-spring.xml]: Cannot resolve reference to bean 'discountService' while setting bean property 'discountService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultDiscountService' defined in class path resource [order-spring.xml]: Cannot resolve reference to bean 'findDiscountValuesStrategy' while setting bean property 'findDiscountValuesStrategy'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'findPDTValuesInformationsSwitcher' defined in class path resource [order-spring.xml]: Cannot resolve reference to bean 'findDeliveryCostStrategy' while setting bean property 'findDeliveryCostStrategy'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customWdFindDeliveryCostStrategy': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customWdDeliveryCostHelper': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customWdUpsRatingService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'restTemplate' available at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1524) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1404) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]