NestedServletException的起源是什么?

时间:2016-02-15 09:46:52

标签: java spring filter hybris

最近我一直在使用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.

1 个答案:

答案 0 :(得分:9)

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

正如您在堆栈跟踪中所看到的,root exceptionnullpointer exception

所以基本上你的NestedServletException只不过是NullpointerException而已被抓住了在某个时刻再次抛出,但被ServletException包裹起来。