NestedServletException

NestedServletException

最近,我一直在使用Hybris平台,今天在Tomcat中遇到了一个异常。问题是我似乎找不到关于NestedServletException是什么或引发原因的任何有价值的信息。目前,我的首要任务是理解概念,然后解决它。

如果有用,我将附加StackTrace:

Estado HTTP 500 - Error while processing internal filterchain. Exception occurred at chain position: 5 of 15. Current filter: 'es.logista.storefront.filters.cms.CMSSiteFilter@539dc64a'!; nested exception is java.lang.NullPointerException

type Informe de Excepción

mensaje Error while processing internal filterchain. Exception occurred at chain position: 5 of 15. Current filter: 'es.logista.storefront.filters.cms.CMSSiteFilter@539dc64a'!; nested exception is java.lang.NullPointerException

descripción El servidor encontró un error interno que hizo que no pudiera rellenar este requerimiento.

excepción

org.springframework.web.util.NestedServletException: Error while processing internal filterchain. Exception occurred at chain position: 5 of 15. Current filter: 'es.logista.storefront.filters.cms.CMSSiteFilter@539dc64a'!; nested exception is java.lang.NullPointerException
    de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:234)
    es.logista.storefront.filters.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:89)
    de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
    es.logista.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.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:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    es.logista.storefront.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:92)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    de.hybris.platform.servicelayer.web.XSSFilter.doFilter(XSSFilter.java:230)

causa raíz

java.lang.NullPointerException
    java.util.concurrent.ConcurrentHashMap.get(Unknown Source)
    de.hybris.platform.persistence.property.PersistenceInfoCache.getCachedExternalTableTypes(PersistenceInfoCache.java:70)
    de.hybris.platform.persistence.property.DBPersistenceManager.getExternalTableTypes(DBPersistenceManager.java:883)
    de.hybris.platform.persistence.flexiblesearch.typecache.impl.DefaultFlexibleSearchTypeCacheProvider.getExternalTableTypes(DefaultFlexibleSearchTypeCacheProvider.java:137)
    de.hybris.platform.persistence.flexiblesearch.ParsedType.<init>(ParsedType.java:93)
    de.hybris.platform.persistence.flexiblesearch.ParsedType.<init>(ParsedType.java:78)
    de.hybris.platform.persistence.flexiblesearch.FromClause.createSingleType(FromClause.java:89)
    de.hybris.platform.persistence.flexiblesearch.FromClause.translateNested(FromClause.java:73)
    de.hybris.platform.persistence.flexiblesearch.ParsedText$2.translate(ParsedText.java:269)
    de.hybris.platform.persistence.flexiblesearch.FlexibleSearchTools.replace(FlexibleSearchTools.java:310)
    de.hybris.platform.persistence.flexiblesearch.ParsedText.translate(ParsedText.java:263)
    de.hybris.platform.persistence.flexiblesearch.FromClause.translate(FromClause.java:48)
    de.hybris.platform.persistence.flexiblesearch.ParsedQuery.translate(ParsedQuery.java:401)
    de.hybris.platform.persistence.flexiblesearch.ParsedQuery.getTranslatedQuery(ParsedQuery.java:181)
    de.hybris.platform.persistence.flexiblesearch.QueryParser.translateQuery(QueryParser.java:229)
    de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.translate(FlexibleSearch.java:2007)
    de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.search(FlexibleSearch.java:1412)
    de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.search(FlexibleSearch.java:1628)
    de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService$2.execute(DefaultFlexibleSearchService.java:374)
    de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService$2.execute(DefaultFlexibleSearchService.java:1)
    de.hybris.platform.servicelayer.session.impl.DefaultSessionService.executeInLocalView(DefaultSessionService.java:91)
    de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService.getJaloResult(DefaultFlexibleSearchService.java:363)
    de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService.search(DefaultFlexibleSearchService.java:164)
    de.hybris.platform.servicelayer.internal.dao.AbstractItemDao.search(AbstractItemDao.java:70)
    de.hybris.platform.cms2.servicelayer.daos.impl.DefaultCMSSiteDao.findAllCMSSites(DefaultCMSSiteDao.java:42)
    de.hybris.platform.cms2.servicelayer.services.impl.DefaultCMSSiteService.getSites(DefaultCMSSiteService.java:317)
    de.hybris.platform.cms2.servicelayer.services.impl.DefaultCMSSiteService.getSiteForURL(DefaultCMSSiteService.java:269)
    de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader.initializeSiteFromRequest(DefaultContextInformationLoader.java:98)
    es.logista.storefront.filters.cms.CMSSiteFilter.processNormalRequest(CMSSiteFilter.java:161)
    es.logista.storefront.filters.cms.CMSSiteFilter.doFilterInternal(CMSSiteFilter.java:97)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
    es.logista.storefront.filters.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:89)
    de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:226)
    es.logista.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.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:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    es.logista.storefront.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:92)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    de.hybris.platform.servicelayer.web.XSSFilter.doFilter(XSSFilter.java:230)

nota La traza completa de la causa de este error se encuentra en los archivos de diario de Apache Tomcat/7.0.59.

最佳答案

嵌套异常是包裹在另一个异常中的异常。人们这样做是出于多种原因(其中有些人提到了here)。

如您在堆栈跟踪中所见,root exceptionnullpointer exception

因此,基本上,您的NestedServletException只是一个NullpointerException,它在某个时刻被再次捕获并抛出,但包裹在ServletException中。

07-27 22:42