初始化全局应用程序上下文时出错!

2020-09-28 04:23发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)大家好,尝试启动服务器tomca...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


大家好,尝试启动服务器tomcat时出现异常:在此处输入代码错误[localhost-startStop-1] [HybrisContextFactory]初始化全局应用程序上下文时出错! org.springframework.beans.factory.BeanCreationException:在类路径资源[CoopAcceleratorFrontEndfacades-spring.xml]中创建名称为'csTicketFacade'的bean时出错。 嵌套的异常是org.springframework.beans.BeanInstantiationException:无法实例化bean类[com.accenture.hybris.facades.customerservice.impl.CoopCSTicketFacade]:构造方法抛出了异常; 嵌套的异常是org.springframework.beans.beans.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:983)上的org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1037)处的java.lang.NullPointerException 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)在org.springframework.beans.factory org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(.org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)的.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:296) org.springframework.beans.factory.support.Abstra上的AbstractBeanFactory.java:293) 位于org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)的ctBeanFactory.getBean(DefaultListableBeanFactory.java:628)位于org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) 在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)在de.hybris.platform.core.HybrisContextFactory.refreshContext(HybrisContextFactory.java:98)在de.hybris.platform.core.HybrisContextFactory $ ApplicationContextFactory de.hybris.platform.core.HybrisContextHolder.getApplicationInstance(HybrisContextHolder.java:90)的de.hybris.platform.core.AbstractTenant.createCoreApplicationContext(AbstractTenant.java:667)的.build(HybrisContextFactory.java:266) 在de.hybris上的hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.java:701)在de.hybri上的hybris.platform.core.AbstractTenant.doStartUp(AbstractTenant.java:650) s.platform.core.Registry.assureTenantStarted(Registry.java:566)位于de.hybris.platform.core.Registry.activateTenant(Registry.java:627)位于de.hybris.platform.core.Registry.setCurrentTenant(Registry。 java:471)位于de.hybris.platform.core.Registry.activateMasterTenant(Registry.java:534)位于de.hybris.platform.core.Registry.startup(Registry.java:420)位于de.hybris.platform.spring .HybrisContextLoaderListener.startRegistry(HybrisContextLoaderListener.java:178)在de.hybris.platform.spring.HybrisContextLoaderListener.initWebApplicationContext(HybrisContextLoaderListener.java:77)在org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener。 org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)的org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)org.apache.catalina.util.LifecycleBase.start( LifecycleBase.java:150),位于org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java :1575),位于org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1565),位于java.util.concurrent.FutureTask.run(FutureTask.java:266),位于java.util.concurrent.ThreadPoolExecutor。 java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)处的runWorker(ThreadPoolExecutor.java:1142)来自java.lang.Thread.run(Thread.java:745)的原因:org.springframework.beans .BeanInstantiationException:无法实例化bean类[com.accenture.hybris.facades.customerservice.impl.CoopCSTicketFacade]:构造方法引发了异常; 嵌套的异常是org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)上的org.springframework.beans.Beans.BeanUtils.instantiateClass(BeanUtils.java:163)处的java.lang.NullPointerException .beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1030)... 33更多原因:com.accenture.facades.common.FlexSelector.getPropertiesReader(FlexSelector.java:29)处的java.lang.NullPointerException com.accenture.hybris.facades.customerservice.impl.CoopCSTicketFacade $ TicketFlexSelector.com.accenture.hybris.facades.customerservice.impl.CoopCSTicketFacade $ TicketFlexSelector.getCsAgentGroupUID(CoopCSTicketFacade.java:68) com.accenture.hybris.facades.customerservice.impl.CoopCSTicketFacade。(CoopCSTicketFacade.java:80)在sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native方法)在sun.reflect.N org.springframework.beans上java.lang.reflect.Constructor.newInstance(Constructor.java:422)上的sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)上的ativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)。 .instantiateClass(BeanUtils.java:148)...还有35个

在这个Java类中:

 包com.accenture.facades.common;
 
  导入java.util.List;
 
  导入org.springframework.context.ApplicationContext;
 
  导入com.accenture.hybris.core.PropertiesReader;
  导入com.accenture.hybris.facades.converters.CoopProductConverter;
 
  导入de.hybris.platform.catalog.CatalogVersionService;
  导入de.hybris.platform.core.Registry;
  导入de.hybris.platform.product.ProductService;
  导入de.hybris.platform.search.restriction.SearchRestrictionService;
  导入de.hybris.platform.servicelayer.i18n.CommonI18NService;
  导入de.hybris.platform.servicelayer.model.ModelService;
  导入de.hybris.platform.servicelayer.search.FlexibleSearchService;
  导入de.hybris.platform.voucher.VoucherService;
 
  公共类FlexSelector {
     
 
     //受保护的静态最终ApplicationContext ctx = Registry.getApplicationContext();
     
      受保护的静态最终字符串CATALOG_ID =" coop.catalog.runtime.name";
      受保护的静态最终字符串CATALOG_VERSION =" coop.catalog.runtime.version";
      受保护的静态最终字符串CURRENCY_ISOCODE =" coop.catalog.runtime.currency.isocode";
     
      受保护的静态最终PropertiesReader getPropertiesReader(){
      返回(PropertiesReader)Registry.getApplicationContext()。getBean(" propertiesReader");
      }
 
      受保护的静态最终SearchRestrictionService getSearchRestrictionService(){
      返回(SearchRestrictionService)Registry.getApplicationContext()。getBean(" searchRestrictionService");
      }
     
      受保护的静态最终CoopProductConverter getConverter(){
      返回(CoopProductConverter)Registry.getApplicationContext()。getBean(" productConverter");
      }
     
 //受保护的静态最终ApplicationContext getApplicationContext(){
 //返回ctx;
 //}
 
      受保护的静态最终 T getModelByExample(T示例){
      返回getFlexibleSearchService()。getModelByExample(example);
      }
 
      受保护的静态最终列表 getModelsByExample(T示例){
      返回getFlexibleSearchService()。getModelsByExample(example);
      }
     
      受保护的静态最终FlexibleSearchService getFlexibleSearchService(){
      返回(FlexibleSearchService)Registry.getApplicationContext()。getBean(" flexibleSearchService");
      }
     
      受保护的静态最终ModelService getModelService(){
      返回(ModelService)Registry.getApplicationContext()。getBean(" modelService");
      }
     
      受保护的静态最终CommonI18NService getCommonI18NService(){
      返回(CommonI18NService)Registry.getApplicationContext()。getBean(" commonI18NService");
      }
     
      受保护的静态最终VoucherService getVoucherService(){
      返回(VoucherService)Registry.getApplicationContext()。getBean(" voucherService");
      }
 
      受保护的静态最终ProductService getProductService(){
      返回(ProductService)Registry.getApplicationContext()。getBean(" productService");
      }
 
      受保护的静态最终CatalogVersionService getCatalogVersionService(){
      返回(CatalogVersionService)Registry.getApplicationContext()。getBean(" catalogVersionService");
      }
  }
 
  

感谢大家的任何建议。 达尼洛。

3条回答
hongfeng1314
2020-09-28 04:51

查看错误的这一部分:"在类路径资源[CoopAcceleratorFrontEndfacades-spring.xml]中定义的''csTicketFacade':"

该xml文件中可能存在语法错误,或者xml中指定的类不存在。

一周热门 更多>