Ошибка при инициализации компонента и свойства - PullRequest
0 голосов
/ 08 октября 2019

Информация об ошибке, которую я получил:

WARN  [main] [ClassPathXmlApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'integrationObjectAudit' defined in class path resource [../resources/integrationobjectaudit-sprint.xml]: Cannot resolve reference to bean 'defaultFlexibleSearchService' while setting bean property 'flexibleSearchService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultFlexibleSearchService' defined in class path resource [../resources/integrationobjectaudit-sprint.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException: Current tenant for servicede.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService@378cfecf should be not null
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'integrationObjectAudit' defined in class path resource [../resources/integrationobjectaudit-sprint.xml]: Cannot resolve reference to bean 'defaultFlexibleSearchService' while setting bean property 'flexibleSearchService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultFlexibleSearchService' defined in class path resource [../resources/integrationobjectaudit-sprint.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException: Current tenant for servicede.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService@378cfecf should be not null
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:314)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1681)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1433)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:144)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:85)
    at de.hybris.platform.integrationservices.audit.IntegrationObjectAuditTest.main(IntegrationObjectAuditTest.java:17)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultFlexibleSearchService' defined in class path resource [../resources/integrationobjectaudit-sprint.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException: Current tenant for servicede.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService@378cfecf should be not null
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:303)
    ... 15 more
Caused by: java.lang.NullPointerException: Current tenant for servicede.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService@378cfecf should be not null
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:895)
    at de.hybris.platform.servicelayer.internal.service.AbstractService.afterPropertiesSet(AbstractService.java:66)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774)
    ... 22 more

1 Ответ

0 голосов
/ 09 октября 2019

Вы обслуживаете:

de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService

Невозможно создать экземпляр, потому что это ваш компонент:

de.hybris.platform.integrationservices.audit.IntegrationObjectAudit 

Невозможно создать

...