What could be causing an error while starting the Hybris Server with code in spring.xml?

302 Views Asked by At

Error creating Spring application context. Shutting down hybris platform since the system cannot be used without working Spring context...

INFO  [localhost-startStop-1] [HybrisContextFactory] Initializing <<global>> Spring ApplicationContext took: (107.4 μs)
de.hybris.platform.core.UninstantiableCoreApplicationContextException: Error creating Spring application context.
        at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.java:796)
        at de.hybris.platform.core.AbstractTenant.doStartUp(AbstractTenant.java:725)
        at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:650)
        at de.hybris.platform.core.Registry.activateTenant(Registry.java:711)
        at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:560)
        at de.hybris.platform.core.Registry.activateMasterTenant(Registry.java:619)
        at de.hybris.platform.core.Registry.startup(Registry.java:438)
        at de.hybris.platform.core.ClassLoaderUtils.executeWithWebClassLoaderParentIfNeeded(ClassLoaderUtils.java:35)
        at de.hybris.platform.spring.HybrisContextLoaderListener.startRegistry(HybrisContextLoaderListener.java:319)
        at de.hybris.platform.spring.HybrisContextLoaderListener.doInitWebApplicationContext(HybrisContextLoaderListener.java:205)
        at de.hybris.platform.spring.HybrisContextLoaderListener.initWebApplicationContext(HybrisContextLoaderListener.java:192)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
        at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitialized(HybrisContextLoaderListener.java:88)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4689)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5155)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.springframework.beans.FatalBeanException: Context hybris Global Context Factory  couldn't  be created correctly due to,


 Error creating bean with name 'fetchDataService' defined in class path resource [trainingcore-spring.xml]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'fetchDataService': Requested bean is currently in creation: Is there an unresolvable circular reference?
        at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFactory.java:307)
        at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.buildSelf(HybrisContextFactory.java:179)
        at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.build(HybrisContextFactory.java:165)
        at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(HybrisContextHolder.java:122)
        at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisContextHolder.java:101)
        at de.hybris.platform.core.HybrisContextHolder.getAppCtxFactory(HybrisContextHolder.java:152)
        at de.hybris.platform.core.HybrisContextHolder.getApplicationInstance(HybrisContextHolder.java:78)
        at de.hybris.platform.core.AbstractTenant.createCoreApplicationContext(AbstractTenant.java:753)
        at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.java:792)
        ... 21 more


Error creating Spring application context. Shutting down hybris platform since the system cannot be used without working Spring context...
INFO  [localhost-startStop-7] [HybrisContextFactory] Initializing <<global>> Spring ApplicationContext took: (23.50 μs)
de.hybris.platform.core.UninstantiableCoreApplicationContextException: Error creating Spring application context.
        at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.java:796)
        at de.hybris.platform.core.AbstractTenant.doStartUp(AbstractTenant.java:725)
        at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:650)
        at de.hybris.platform.core.Registry.activateTenant(Registry.java:711)
        at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:560)
        at de.hybris.platform.core.Registry.activateMasterTenant(Registry.java:619)
        at de.hybris.platform.core.Registry.startup(Registry.java:438)
        at de.hybris.platform.core.ClassLoaderUtils.executeWithWebClassLoaderParentIfNeeded(ClassLoaderUtils.java:35)
        at de.hybris.platform.spring.HybrisContextLoaderListener.startRegistry(HybrisContextLoaderListener.java:319)
        at de.hybris.platform.spring.HybrisContextLoaderListener.doInitWebApplicationContext(HybrisContextLoaderListener.java:205)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
        at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitialized(HybrisContextLoaderListener.java:88)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4689)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5155)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.springframework.beans.FatalBeanException: Context hybris Global Context Factory  couldn't  be created correctly due to,

 Error creating bean with name 'fetchDataService' defined in class path resource [trainingcore-spring.xml]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'fetchDataService': Requested bean is currently in creation: Is there an unresolvable circular reference?
        at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFactory.java:307)
        at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.buildSelf(HybrisContextFactory.java:179)
        at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.build(HybrisContextFactory.java:165)
        at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(HybrisContextHolder.java:122)
        at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisContextHolder.java:101)
        at de.hybris.platform.core.HybrisContextHolder.getAppCtxFactory(HybrisContextHolder.java:152)
        at de.hybris.platform.core.HybrisContextHolder.getApplicationInstance(HybrisContextHolder.java:78)
        at de.hybris.platform.core.AbstractTenant.createCoreApplicationContext(AbstractTenant.java:753)
        at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.java:792)
        ... 21 more
Error creating Spring application context. Shutting down hybris platform since the system cannot be used without working Spring context...
INFO  [Thread-3] [HybrisContextFactory] Initializing <<global>> Spring ApplicationContext took: (21.60 μs)

ERROR [Thread-3] [JMXBeanLoader] Can't unregister jmxbeans on shutdown of the tenant <<master>>
org.springframework.beans.FatalBeanException: Context hybris Global Context Factory  couldn't  be created correctly due to, Error creating bean with name 'fetchDataService' defined in class path resource [trainingcore-spring.xml]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'fetchDataService': Requested bean is currently in creation: Is there an unresolvable circular reference?
        at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFactory.java:307) ~[coreserver.jar:?]
        at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.buildSelf(HybrisContextFactory.java:179) ~[coreserver.jar:?]
        at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.build(HybrisContextFactory.java:165) ~[coreserver.jar:?]
        at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(HybrisContextHolder.java:122) ~[coreserver.jar:?]
        at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisContextHolder.java:101) ~[coreserver.jar:?]
        at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext(Registry.java:1116) ~[coreserver.jar:?]
        at de.hybris.platform.core.JMXBeanLoader.getMBeanRegistry(JMXBeanLoader.java:141) ~[coreserver.jar:?]
        at de.hybris.platform.core.JMXBeanLoader.beforeTenantShutDown(JMXBeanLoader.java:104) [coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.notifyTenantListenersBeforeShutdown(AbstractTenant.java:1315) [coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java:996) [coreserver.jar:?]
ERROR [Thread-3] [RegionCacheAdapter] Unable to clear cache. Failed on region entityCacheRegion. Last key null null
java.lang.IllegalStateException: The entityCacheRegion Cache is not alive (STATUS_SHUTDOWN)
        at net.sf.ehcache.Cache$CacheStatus.checkAlive(Cache.java:4075) ~[ehcache-2.9.0.jar:2.9.0]
        at net.sf.ehcache.Cache.checkStatus(Cache.java:2766) ~[ehcache-2.9.0.jar:2.9.0]
        at net.sf.ehcache.Cache.getKeys(Cache.java:2066) ~[ehcache-2.9.0.jar:2.9.0]
        at de.hybris.platform.regioncache.region.impl.EHCacheRegion.getAllKeys(EHCacheRegion.java:423) ~[coreserver.jar:?]
        at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAdapter.java:283) [coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.java:1140) [coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java:1014) [coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java:957) [coreserver.jar:?]
        at de.hybris.platform.core.Registry.destroy(Registry.java:325) [coreserver.jar:?]
        at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.java:67) [coreserver.jar:?]
        at de.hybris.platform.util.RedeployUtilities$1.internalRun(RedeployUtilities.java:32) [coreserver.jar:?]
        at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:124) [coreserver.jar:?]
WARN  [Thread-3] [AbstractTenant] The entityCacheRegion Cache is not alive (STATUS_SHUTDOWN)
java.lang.IllegalStateException: The entityCacheRegion Cache is not alive (STATUS_SHUTDOWN)
        at net.sf.ehcache.Cache$CacheStatus.checkAlive(Cache.java:4075) ~[ehcache-2.9.0.jar:2.9.0]
        at net.sf.ehcache.Cache.checkStatus(Cache.java:2766) ~[ehcache-2.9.0.jar:2.9.0]
        at net.sf.ehcache.Cache.getKeys(Cache.java:2066) ~[ehcache-2.9.0.jar:2.9.0]
        at de.hybris.platform.regioncache.region.impl.EHCacheRegion.getAllKeys(EHCacheRegion.java:423) ~[coreserver.jar:?]
        at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAdapter.java:283) ~[coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.java:1140) [coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java:1014) [coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java:957) [coreserver.jar:?]
        at de.hybris.platform.core.Registry.destroy(Registry.java:325) [coreserver.jar:?]
        at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.java:67) [coreserver.jar:?]
        at de.hybris.platform.util.RedeployUtilities$1.internalRun(RedeployUtilities.java:32) [coreserver.jar:?]
        at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:124) [coreserver.jar:?]


ERROR [Thread-3] [RegionCacheAdapter] Unable to clear cache. Failed on region entityCacheRegion. Last key null null
java.lang.IllegalStateException: The entityCacheRegion Cache is not alive (STATUS_SHUTDOWN)
        at net.sf.ehcache.Cache$CacheStatus.checkAlive(Cache.java:4075) ~[ehcache-2.9.0.jar:2.9.0]
        at net.sf.ehcache.Cache.checkStatus(Cache.java:2766) ~[ehcache-2.9.0.jar:2.9.0]
        at net.sf.ehcache.Cache.getKeys(Cache.java:2066) ~[ehcache-2.9.0.jar:2.9.0]
        at de.hybris.platform.regioncache.region.impl.EHCacheRegion.getAllKeys(EHCacheRegion.java:423) ~[coreserver.jar:?]
        at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAdapter.java:283) [coreserver.jar:?]
        at de.hybris.platform.cache.impl.RegionCacheAdapter.destroy(RegionCacheAdapter.java:512) [coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.java:1150) [coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java:1014) [coreserver.jar:?]
        at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java:957) [coreserver.jar:?]
        at de.hybris.platform.core.Registry.destroy(Registry.java:325) [coreserver.jar:?]
        at 
de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:124) [coreserver.jar:?]
WARN  [Thread-3] [AbstractTenant] The entityCacheRegion Cache is not alive (STATUS_SHUTDOWN)
java.lang.IllegalStateException: The entityCacheRegion Cache is not alive (STATUS_SHUTDOWN)
        at net.sf.ehcache.Cache$CacheStatus.checkAlive(Cache.java:4075) ~[ehcache-2.9.0.jar:2.9.0]
        at net.sf.ehcache.Cache.checkStatus(Cache.java:2766) ~[ehcache-2.9.0.jar:2.9.0]
        at net.sf.ehcache.Cache.getKeys(Cache.java:2066) ~[ehcache-2.9.0.jar:2.9.0]
        at de.hybris.platform.regioncache.region.impl.EHCacheRegion.getAllKeys(EHCacheRegion.java:423) ~[coreserver.jar:?]
        at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAdapter.java:283) ~[coreserver.jar:?]
        at de.hybris.platform.cache.impl.RegionCacheAdapter.destroy(RegionCacheAdapter.java:512) ~[coreserver.jar:?]
        at jar:?]
        at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java:957) [coreserver.jar:?]
        at de.hybris.platform.core.Registry.destroy(Registry.java:325) [coreserver.jar:?]
        at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.java:67) [coreserver.jar:?]
        at de.hybris.platform.util.RedeployUtilities$1.internalRun(RedeployUtilities.java:32) [coreserver.jar:?]
        at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:124) [coreserver.jar:?]
INFO  [Thread-3] [DefaultClusterNodeManagementService] Unregistering assigned cluster node id 0...
INFO  [AfterSaveEventPublisher-master] [DefaultAfterSaveListenerRegistry] AfterSaveEventPublisher-master has been interrupted/terminated but without InterruptedException - stopping now.
Exception in thread "AfterSaveEventPublisher-master" java.lang.IllegalStateException: Can not activate tenant <<master>> since it has no application context created
        at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:674)
        at de.hybris.platform.core.Registry.activateTenant(Registry.java:711)
        at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:560)
        at de.hybris.platform.tx.DefaultAfterSaveListenerRegistry$AfterSaveEventPublisherThread.internalRun(DefaultAfterSaveListenerRegistry.java:242)
        at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:124)
<-- Wrapper Stopped
C:\dcxtraining2005\hybris\bin\platform>m
'm' is not recognized as an internal or external command,
operable program or batch file.

`` This is bean registration in spring.xml

  <bean id ="fetchDataService" class ="com.training.core.service.impl.DefaultErpFetchDataService">
  <constructor-arg name="restTemplate" ref="erpRestTemplate"/>
  </bean> ``
0

There are 0 best solutions below