gpt4 book ai didi

java - Hybris 实体未找到异常

转载 作者:塔克拉玛干 更新时间:2023-11-01 22:26:23 24 4
gpt4 key购买 nike

我们的 hybris 实现中存在一个相当大的问题,缺少完整的数据库。我们一直收到“找不到实体”错误。它是在上周一随机开始的。导致错误的记录在数据库中,我们可以使用 flexi-search 来查找它们,但是其中许多记录连续抛出 4 或 5 个错误。我们使用更新运行系统进行了构建,但是它没有解决问题。大多数错误都是抛出 btgresults 和 cartentries。我们无法在我们的暂存或开发系统中重现该问题。以下是日志中的错误示例:

6:41:35.587 PM  
INFO | jvm 1 | main | 2014/06/07 22:41:35.587 | [mde.hybris.platform.util.jeeapi.YNoSuchEntityException: Entity not found ( pk = 8847902804326 name = 'de.hybris.platform.persistence.btg_BTGAbstractResult' type code = '2406' db table = 'btgresult')
host = sop-p-ma-app-002
source = /opt/hybris/log/tomcat/console-20140607.log
sourcetype = java_console
6/7/14
6:41:06.253 PM
INFO | jvm 1 | main | 2014/06/07 22:41:06.253 | [mde.hybris.platform.util.jeeapi.YNoSuchEntityException: Entity not found ( pk = 8847902411110 name = 'de.hybris.platform.persistence.btg_BTGAbstractResult' type code = '2406' db table = 'btgresult')
host = sop-p-ma-app-002
source = /opt/hybris/log/tomcat/console-20140607.log
sourcetype = java_console
6/7/14
6:41:06.051 PM
INFO | jvm 1 | main | 2014/06/07 22:41:06.051 | [mde.hybris.platform.util.jeeapi.YNoSuchEntityException: Entity not found ( pk = 8847902345574 name = 'de.hybris.platform.persistence.btg_BTGAbstractResult' type code = '2406' db table = 'btgresult')
host = sop-p-ma-app-002
source = /opt/hybris/log/tomcat/console-20140607.log
sourcetype = java_console
6/7/14
6:40:50.233 PM
INFO | jvm 1 | main | 2014/06/07 22:40:50.233 | [mde.hybris.platform.util.jeeapi.YNoSuchEntityException: Entity not found ( pk = 8832652476459 name = 'de.hybris.platform.persistence.core_Cart' type code = '43' db table = 'carts')
host = sop-p-ma-app-002
source = /opt/hybris/log/tomcat/console-20140607.log
sourcetype = java_console
6/7/14
6:40:50.032 PM
INFO | jvm 1 | main | 2014/06/07 22:40:50.032 | [mde.hybris.platform.util.jeeapi.YNoSuchEntityException: Entity not found ( pk = 8832652443691 name = 'de.hybris.platform.persistence.core_Cart' type code = '43' db table = 'carts')
host = sop-p-ma-app-002
source = /opt/hybris/log/tomcat/console-20140607.log
sourcetype = java_console
6/7/14
6:40:49.930 PM
INFO | jvm 1 | main | 2014/06/07 22:40:49.930 | [mde.hybris.platform.util.jeeapi.YNoSuchEntityException: Entity not found ( pk = 8832652410923 name = 'de.hybris.platform.persistence.core_Cart' type code = '43' db table = 'carts')
host = sop-p-ma-app-002
source = /opt/hybris/log/tomcat/console-20140607.log
sourcetype = java_console

还有一个错误的堆栈跟踪:

HTTP Status 500 - Entity not found ( pk = 8847703804262 name = 'de.hybris.platform.persistence.btg_BTGAbstractResult' type code = '2406' db table = 'btgresult')
type Exception report
message Entity not found ( pk = 8847703804262 name = 'de.hybris.platform.persistence.btg_BTGAbstractResult' type code = '2406' db table = 'btgresult')
description The server encountered an internal error that prevented it from fulfilling this request.
exception
de.hybris.platform.util.jeeapi.YNoSuchEntityException: Entity not found ( pk = 8847703804262 name = 'de.hybris.platform.persistence.btg_BTGAbstractResult' type code = '2406' db table = 'btgresult')
de.hybris.platform.persistence.GenericBMPBean.loadData(GenericBMPBean.java:259)
de.hybris.platform.persistence.GenericBMPBean.ejbLoad(GenericBMPBean.java:148)
de.hybris.platform.persistence.framework.RemoteInvocationHandler.performOther(RemoteInvocationHandler.java:187)
de.hybris.platform.persistence.framework.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:107)
com.sun.proxy.$Proxy45.getModifiedTime(Unknown Source)
de.hybris.platform.persistence.ItemEJBImpl.getModificationTime(ItemEJBImpl.java:142)
de.hybris.platform.jalo.Item.getModificationTimeFromPersistenceLayer(Item.java:1516)
de.hybris.platform.jalo.Item.getLocalItemCache(Item.java:1387)
de.hybris.platform.jalo.Item.getGetterSetterCache(Item.java:1397)
de.hybris.platform.jalo.Item.access$1(Item.java:1395)
de.hybris.platform.jalo.Item$CacheableItemLogic.getCacheMap(Item.java:542)
de.hybris.platform.jalo.Item$CachedGetter.get(Item.java:668)
de.hybris.platform.jalo.Item$CachedGetter.get(Item.java:655)
de.hybris.platform.jalo.Item.getPersistenceVersion(Item.java:1534)
de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.save(ItemModelConverter.java:630)
de.hybris.platform.servicelayer.internal.model.impl.ModelWrapper.save(ModelWrapper.java:149)
de.hybris.platform.servicelayer.internal.model.impl.ResolvingModelPersister.saveNewOnes(ResolvingModelPersister.java:127)
de.hybris.platform.servicelayer.internal.model.impl.ResolvingModelPersister.persist(ResolvingModelPersister.java:95)
de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAllInternal(DefaultModelService.java:1103)
de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAll(DefaultModelService.java:1090)
de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.save(DefaultModelService.java:735)
de.hybris.platform.btg.dao.impl.DefaultBTGDao.createConditionResult(DefaultBTGDao.java:318)
de.hybris.platform.btg.dao.impl.ResultCachingBTGDaoDecorator.createConditionResult(ResultCachingBTGDaoDecorator.java:241)
de.hybris.platform.btg.condition.impl.DefaultBTGExpressionEvaluator.setConditionResultAfterEvaluation(DefaultBTGExpressionEvaluator.java:222)
de.hybris.platform.btg.condition.impl.DefaultBTGExpressionEvaluator.evaluate(DefaultBTGExpressionEvaluator.java:142)
de.hybris.platform.btg.condition.impl.DefaultBTGExpressionEvaluator.evaluate(DefaultBTGExpressionEvaluator.java:1)
de.hybris.platform.btg.rule.impl.DefaultRuleEvaluator.evaluate(DefaultRuleEvaluator.java:109)
de.hybris.platform.btg.segment.impl.DefaultSegmentEvaluator.evaluate(DefaultSegmentEvaluator.java:124)
de.hybris.platform.btg.services.impl.DefaultBTGEvaluationService.evaluateSegment(DefaultBTGEvaluationService.java:105)
de.hybris.platform.btg.services.impl.DefaultBTGEvaluationService.evaluateAllSegments(DefaultBTGEvaluationService.java:80)
de.hybris.platform.btg.services.impl.DefaultBTGEvaluationService.evaluateAllSegments(DefaultBTGEvaluationService.java:62)
de.hybris.platform.btg.services.impl.DefaultBTGEvaluationService.evaluateAllSegments(DefaultBTGEvaluationService.java:55)
com.so.storefront.filters.btg.support.impl.DefaultBTGSegmentStrategy.evaluateSegment(DefaultBTGSegmentStrategy.java:98)
com.so.storefront.filters.btg.BTGSegmentFilter.doFilterInternal(BTGSegmentFilter.java:48)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.btg.AbstractBtgFilter.doFilterInternal(AbstractBtgFilter.java:57)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.btg.AbstractBtgFilter.doFilterInternal(AbstractBtgFilter.java:57)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.btg.AbstractBtgFilter.doFilterInternal(AbstractBtgFilter.java:57)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.btg.AbstractBtgFilter.doFilterInternal(AbstractBtgFilter.java:57)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.CrossScriptingFilter.doFilterInternal(CrossScriptingFilter.java:36)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.SpecialAccountsFilter.doFilterInternal(SpecialAccountsFilter.java:470)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.CustomerLocationRestorationFilter.doFilterInternal(CustomerLocationRestorationFilter.java:63)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.CartRestorationFilter.doFilterInternal(CartRestorationFilter.java:133)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.AnonymousCheckoutFilter.doFilterInternal(AnonymousCheckoutFilter.java:62)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:139)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:144)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.UrlEncoderFilter.doFilterInternal(UrlEncoderFilter.java:100)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.StorefrontFilter.doFilterInternal(StorefrontFilter.java:73)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.cms.CMSSiteFilter.doFilterInternal(CMSSiteFilter.java:108)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.RequestLoggerFilter.doFilterInternal(RequestLoggerFilter.java:79)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
com.so.storefront.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:92)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
de.hybris.platform.servicelayer.web.SessionFilter.doFilter(SessionFilter.java:73)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.doFilterInternal(AbstractPlatformFilterChain.java:156)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
com.so.storefront.filters.UrlPathFilter.doFilterInternal(UrlPathFilter.java:85)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:256)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$StatisticsGatewayFilter.doFilter(AbstractPlatformFilterChain.java:345)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
de.hybris.platform.servicelayer.web.RedirectWhenSystemIsNotInitializedFilter.doFilter(RedirectWhenSystemIsNotInitializedFilter.java:104)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
de.hybris.platform.servicelayer.web.TenantActivationFilter.doFilter(TenantActivationFilter.java:91)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
de.hybris.platform.servicelayer.web.Log4JFilter.doFilter(Log4JFilter.java:47)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.doFilterInternal(AbstractPlatformFilterChain.java:156)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
com.so.storefront.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:92)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.36 logs.

更新:只是一些新信息,错误似乎总是在创建记录时发生。是否有可能我们的数据库中存在一些延迟并且记录已成功创建但未返回到应用程序?

此外,错误总是出现在 de.hybris.platform.persistence.GenericBMPBean.loadData(GenericBMPBean.java:259) 中,不确定这是否完好无损,如果堆栈中的其他东西调用了这个错误,那么错误就开始了GenericBMPBean 的文档非常清楚。 “找不到实体”意味着没有给定 pk 的项目。根据数据库,我假设这条记录不存在是错误的吗?无论是因为延迟还是数据库错误。

记录确实存在,并且 infact 是在引发错误的同一堆栈跟踪中创建的。

最佳答案

原来这与代码或配置无关。这是一个数据库错误。虽然我们的托管服务合作伙伴在他们的诊断中没有发现任何错误,但重启数据库解决了这个问题。

关于java - Hybris 实体未找到异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24101640/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com