PersistenceInfoCache.getCachedExternalTableTypes()上的NullPointerException

2020-09-18 12:43发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)执行ant目标 junitini...

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

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


执行ant目标 junitinit 后,我们将执行另一个ant目标,以通过导入impex文件来加载项目特定的内容。 一旦最后一个目标开始执行,就会引发以下异常:

  [java]错误[Task-junit-poll](junit)[ComposedType]找到无效的关系属性User.writableCockpitUIComponents-没有关系类型引用
       [java]错误[Task-junit-poll](junit)[ComposedType]找到无效的关系属性User.writeCollections-没有关系类型引用
       [java]错误[Task-junit-poll](junit)[HybrisApplicationEventMulticaster]
       [java] java.lang.NullPointerException
       [java]位于de.hybris.platform.jalo.type.RelationDescriptor.isSource(RelationDescriptor.java:66)
       [java]位于de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.adjustRelationInfo(ItemModelConverter.java:1137)
       [java] de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.calculateTypeAttributeInfos(ItemModelConverter.java:1091)
       [java]位于de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.getTypeMetaInfo(ItemModelConverter.java:270)
       [java]位于de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.createContextForExistingModel(ItemModelConverter.java:344)
       [java]位于de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.load(ItemModelConverter.java:373)
       [java]位于de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.load(ItemModelConverter.java:1)
       [java]位于de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.doLoad(DefaultModelService.java:868)
       [java] de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.get(DefaultModelService.java:270)
       [java] at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.getModelForPersistentValue(DefaultModelService.java:891)
       [java]位于de.hybris.platform.servicelayer.internal.model.impl.AbstractModelService.toModelLayer(AbstractModelService.java:96)
       [java] at de.hybris.platform.servicelayer.session.impl.DefaultSession.getAttribute(DefaultSession.java:62)
       [java] de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getAttribute(DefaultSessionService.java:152)
       [java]位于de.hybris.platform.servicelayer.user.impl.DefaultUserService.getCurrentUser(DefaultUserService.java:120)
       [java]位于de.hybris.platform.order.events.AfterSessionUserChangeListener.onEvent(AfterSessionUserChangeListener.java:43)
       [java]位于de.hybris.platform.order.events.AfterSessionUserChangeListener.onEvent(AfterSessionUserChangeListener.java:1)
       [java]位于de.hybris.platform.order.events.AfterSessionUserChangeListener $$ EnhancerBySpringCGLIB $$ 5acdd86.onEvent(<生成>)
       [java]位于de.hybris.platform.servicelayer.event.impl.AbstractEventListener.onApplicationEvent(AbstractEventListener.java:67)
       [java]位于de.hybris.platform.servicelayer.event.impl.AbstractEventListener.onApplicationEvent(AbstractEventListener.java:1)
       [java]位于de.hybris.platform.order.events.AfterSessionUserChangeListener $$ EnhancerBySpringCGLIB $$ 5acdd86.onApplicationEvent()
       [java] de.hybris.platform.servicelayer.event.impl.HybrisApplicationEventMulticaster.notifyListeners(HybrisApplicationEventMulticaster.java:85)
       [java] at de.hybris.platform.servicelayer.event.impl.HybrisApplicationEventMulticaster.multicastEvent(HybrisApplicationEventMulticaster.java:61)
       [java] org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
       [java]位于de.hybris.platform.spring.ctx.CloseAwareApplicationContext.publishEvent(CloseAwareApplicationContext.java:97)
       [java]位于de.hybris.platform.servicelayer.event.impl.SpringEventSender.sendEvent(SpringEventSender.java:36)
       [java]位于de.hybris.platform.servicelayer.event.impl.PlatformClusterEventSender.sendEvent(PlatformClusterEventSender.java:63)
       [java]位于de.hybris.platform.servicelayer.event.impl.DefaultEventService.publishEvent(DefaultEventService.java:78)
       [java]位于de.hybris.platform.servicelayer.internal.jalo.ServicelayerManager.afterSessionUserChange(ServicelayerManager.java:238)
       [java]位于de.hybris.platform.jalo.JaloSession.notifyExtensionsAfterUserChange(JaloSession.java:2239)
       [java]位于de.hybris.platform.jalo.JaloSession.setUser(JaloSession.java:971)
       [java] at de.hybris.platform.task.impl.DefaultTaskService $ Poll.prepareProcessing(DefaultTaskService.java:773)
       [java]位于de.hybris.platform.task.impl.DefaultTaskService $ Poll.run(DefaultTaskService.java:652)

  

还有这个:

  [java] java.lang.NullPointerException
       [java]位于java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
       [java]位于java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988)
       [java] at de.hybris.platform.persistence.property.PersistenceInfoCache.getCachedExternalTableTypes(PersistenceInfoCache.java:70)
       [java]位于de.hybris.platform.persistence.property.DBPersistenceManager.getExternalTableTypes(DBPersistenceManager.java:883)
       [java] de.hybris.platform.persistence.flexiblesearch.typecache.impl.DefaultFlexibleSearchTypeCacheProvider.getExternalTableTypes(DefaultFlexibleSearchTypeCacheProvider.java:137)
       [java] de.hybris.platform.persistence.flexiblesearch.ParsedType。(ParsedType.java:93)
       [java] at de.hybris.platform.persistence.flexiblesearch.ParsedType。(ParsedType.java:78)
       [java] de.hybris.platform.persistence.flexiblesearch.FromClause.createSingleType(FromClause.java:89)
       [java] de.hybris.platform.persistence.flexiblesearch.FromClause.translateNested(FromClause.java:73)
       [java] de.hybris.platform.persistence.flexiblesearch.ParsedText $ 2.translate(ParsedText.java:269)
       [java]位于de.hybris.platform.persistence.flexiblesearch.FlexibleSearchTools.replace(FlexibleSearchTools.java:310)
       [java] at de.hybris.platform.persistence.flexiblesearch.ParsedText.translate(ParsedText.java:263)
       [java] de.hybris.platform.persistence.flexiblesearch.FromClause.translate(FromClause.java:48)
       [java] de.hybris.platform.persistence.flexiblesearch.ParsedQuery.translate(ParsedQuery.java:401)
       [java]位于de.hybris.platform.persistence.flexiblesearch.ParsedQuery.getTranslatedQuery(ParsedQuery.java:181)
       [java]位于de.hybris.platform.persistence.flexiblesearch.QueryParser.translateQuery(QueryParser.java:229)
       [java] at de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.translate(FlexibleSearch.java:2006)
       [java]位于de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.search(FlexibleSearch.java:1411)
       [java] de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.search(FlexibleSearch.java:1363)
       [java] de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.search(FlexibleSearch.java:1602)
       [java]位于de.hybris.platform.task.impl.DefaultTaskService.recoverRunning(DefaultTaskService.java:936)
       [java] at de.hybris.platform.task.impl.DefaultTaskService.access $ 3(DefaultTaskService.java:921)
       [java]位于de.hybris.platform.task.impl.DefaultTaskService $ Poll.prepareProcessing(DefaultTaskService.java:775)
       [java]位于de.hybris.platform.task.impl.DefaultTaskService $ Poll.run(DefaultTaskService.java:652)

  

有人知道我如何避免它以及为什么会发生吗? 谢谢。

2条回答
浮生未央
2020-09-18 13:17

我发现正在运行相同的 de.hybris.platform.yacceleratorfulfilmentprocess.test.CheckTransactionReviewStatusActionTest 。 问题是我忘了在运行测试之前初始化junit租户。 最有趣的是,此测试是hybris单元测试中唯一需要在单元测试之前运行yunitinit的测试。

一周热门 更多>