JaloSession.getAttribute中的NullPointerException

2020-09-09 01:45发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)我们经常在JaloSession...

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

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


我们经常在JaloSession.getAttribute上获取日志NullPointerException,但我无法欣赏系统上的任何问题,因此无法重现。

我们正在尝试使用DefaultBaseSiteService获取当前的BaseSite,而我正在获取此堆栈跟踪:

  de.hybris.platform.jalo.JaloSession.getAttribute(JaloSession.java:1478)
  de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getOrBindSession(DefaultSessionService.java:217)
  de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getCurrentSession(DefaultSessionService.java:52)
  de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getAttribute(DefaultSessionService.java:179)
  de.hybris.platform.site.impl.DefaultBaseSiteService.getCurrentBaseSiteImpl(DefaultBaseSiteService.java:77)
  de.hybris.platform.site.impl.DefaultBaseSiteService.getCurrentBaseSite(DefaultBaseSiteService.java:94)
  net.netconomy.featureflag.services.session.impl.ApplicationFeatureSessionStoreKeyBaseSiteService.getCurrentBaseSiteId(ApplicationFeatureSessionStoreKeyBaseSiteService.java:36)
  net.netconomy.featureflag.services.session.impl.ApplicationFeatureSessionStoreKeyBaseSiteService.getSessionKey(ApplicationFeatureSessionStoreKeyBaseSiteService.java:32)
  net.netconomy.featureflag.services.session.impl.DefaultApplicationFeatureSessionStore.getOrLoadApplicationFeatures(DefaultApplicationFeatureSessionStore.java:58)
  net.netconomy.featureflag.services.session.impl.DefaultApplicationFeatureSessionStore.loadApplicationFeatures(DefaultApplicationFeatureSessionStore.java:65)
  net.netconomy.featureflag.services.impl.DefaultApplicationFeatureService.getApplicationFeatureForCurrentUser(DefaultApplicationFeatureService.java:67)
  net.netconomy.xxxlgroup.core.cross.feature.service.XApplicationFeatureService.isFeatureEnabledForCurrentUser(XApplicationFeatureService.java:305)
  net.netconomy.xxxlgroup.core.cross.feature.service.XApplicationFeatureService.isFeatureEnabledForUser(XApplicationFeatureService.java:225)
  net.netconomy.xxxlgroup.core.cross.feature.service.XApplicationFeatureService.isShoppingEnabled(XApplicationFeatureService.java:146)
  net.netconomy.xxxlgroup.core.cross.feature.service.XApplicationFeatureService $$ FastClassBySpringCGLIB $$ c9fa6c59.invoke(<生成>:-1)
  org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
  org.springframework.aop.framework.CglibAopProxy $ DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:667)
  net.netconomy.xxxlgroup.core.cross.feature.service.XApplicationFeatureService $$ EnhancerBySpringCGLIB $$ e728fda9.isShoppingEnabled(<生成>:-1)
  net.netconomy.xxxlgroup.core.facades.account.usermgmt.XCartRecreationFacade.allowAnonymousCookies(XCartRecreationFacade.java:87)
  net.netconomy.xxxlgroup.core.facades.account.usermgmt.XCartRecreationFacade.recreateAnonymousCart(XCartRecreationFacade.java:91)
  net.netconomy.xxxlgroup.core.facades.account.authentication.XSessionFailoverFacade.lambda $ 1(XSessionFailoverFacade.java:71)
  java.util.ArrayList $ ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
  java.util.stream.ReferencePipeline $ Head.forEach(ReferencePipeline.java:580)
  net.netconomy.xxxlgroup.core.facades.account.authentication.XSessionFailoverFacade.recreateAnonymousCarts(XSessionFailoverFacade.java:71)
  net.netconomy.xxxlgroup.core.facades.account.authentication.XSessionFailoverFacade.restoreSessionData(XSessionFailoverFacade.java:52)
  net.netconomy.xxxlweb.cross.interceptor.CookieInterceptor.doPreHandleAction(CookieInterceptor.java:84)
  net.netconomy.xxxlweb.cross.interceptor.CookieInterceptor.preHandle(CookieInterceptor.java:78)
  org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:133)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:962)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
  com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  net.netconomy.xxxlweb.api.security.CSRFTokenValidationFilter.doFilter(CSRFTokenValidationFilter.java:43)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  net.netconomy.xxxlweb.api.security.CSRFTokenIssueFilter.doFilter(CSRFTokenIssueFilter.java:46)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
  org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
  org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
  org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  net.netconomy.urlmapper.filter.UrlMapperFilter.doFilter(UrlMapperFilter.java:93)
  org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
  org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:330)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ StatisticsGatewayFilter.doFilter(AbstractPlatformFilterChain.java:419)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:300)
  net.netconomy.xxxlweb.cross.filter.AbstractExecutionFilter.doFilter(AbstractExecutionFilter.java:22)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:300)
  net.netconomy.xxxlweb.cross.filter.AbstractExecutionFilter.doFilter(AbstractExecutionFilter.java:22)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:300)
  net.netconomy.xxxlweb.cross.filter.XSmartEditFilter.doFilterInternal(XSmartEditFilter.java:75)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:300)
  net.netconomy.xxxlweb.cross.filter.XResourceFilter.doFilterInternal(XResourceFilter.java:39)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:300)
  net.netconomy.xxxlweb.cross.filter.AbstractExecutionFilter.doFilter(AbstractExecutionFilter.java:22)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:300)
  net.netconomy.xxxlgroup.cache.filter.XCacheFilter.doFilterInternal(XCacheFilter.java:40)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:300)
  de.hybris.platform.servicelayer.web.SessionFilter.doFilter(SessionFilter.java:99)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:300)
  de.hybris.platform.servicelayer.web.Log4JFilter.doFilter(Log4JFilter.java:44)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:300)
  org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164)
  org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)
  de.hybris.platform.servicelayer.web.session.HybrisSpringSessionFilter.doFilterWithSessionRepository(HybrisSpringSessionFilter.java:79)
  de.hybris.platform.servicelayer.web.session.HybrisSpringSessionFilter.doFilter(HybrisSpringSessionFilter.java:65)
  net.netconomy.xxxlweb.cross.filter.XHybrisSpringSessionFilter.doFilter(XHybrisSpringSessionFilter.java:46)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:300)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.processStandardFilterChain(AbstractPlatformFilterChain.java:209)
  de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.doFilterInternal(AbstractPlatformFilterChain.java:186)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
  org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  de.hybris.platform.servicelayer.web.XSSFilter.processPatternsAndDoFilter(XSSFilter.java:358)
  de.hybris.platform.servicelayer.web.XSSFilter.doFilter(XSSFilter.java:306)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
  org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
  org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:685)
  org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
  org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
  org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
  org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:800)
  org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1471)
  org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)
  org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)

  

我们正在使用SAP Hybris Commerce Suite 18.8.2,任何提示将不胜感激。

1条回答
打个大熊猫
2020-09-09 02:23

胡安,你好

从日志中可以发现,这可能是会话超时的原因。 能不能请您检查一下。

谢谢,Subhash。

一周热门 更多>