spring boot + spring security

974 views Asked by At

A web project that uses the Spring MVC framework is transformed into a springboot project,when I start the project, some custom filter class in the springsecurity XMLconfiguration file is initialized with some error.

2016-12-20 13:31:20.246  INFO 8348 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/card/addUserCard'], []
2016-12-20 13:31:20.982  INFO 8348 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/account/info/phone'], [org.springframework.security.web.context.SecurityContextPersistenceFilter@fcdc54b, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@518f762b, org.springframework.security.web.header.HeaderWriterFilter@2ddbeadd, org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter@781e4f0f, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@324ec65d, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@4d06465d, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@4687c5a7, org.springframework.security.web.session.SessionManagementFilter@4fd812, org.springframework.security.web.access.ExceptionTranslationFilter@e801dfa, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2a936788]
2016-12-20 13:31:21.044  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [protected final void com.tjiptv.iptvuser.service.oauth2.AbstractOAuth2SecurityExceptionHandler.doHandle(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.Exception) throws java.io.IOException,javax.servlet.ServletException] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.059  INFO 8348 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/oauth/token'], [org.springframework.security.web.context.SecurityContextPersistenceFilter@356e8307, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@522dd798, org.springframework.security.web.header.HeaderWriterFilter@770c92e8, org.springframework.security.oauth2.provider.client.ClientCredentialsTokenEndpointFilter@345c38da, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@4868481a, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@ba4884a, org.springframework.security.web.access.ExceptionTranslationFilter@7a60327c, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@5fcaf2b2]
2016-12-20 13:31:21.085  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.setRequiresAuthenticationRequestMatcher(org.springframework.security.web.util.matcher.RequestMatcher)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.085  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.web.filter.GenericFilterBean.init(javax.servlet.FilterConfig) throws javax.servlet.ServletException] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.085  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [protected final java.lang.String org.springframework.web.filter.GenericFilterBean.getFilterName()] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.085  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.web.filter.GenericFilterBean.setBeanName(java.lang.String)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.085  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final javax.servlet.FilterConfig org.springframework.web.filter.GenericFilterBean.getFilterConfig()] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.085  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.web.filter.GenericFilterBean.setServletContext(javax.servlet.ServletContext)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.085  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [protected final void org.springframework.web.filter.GenericFilterBean.addRequiredProperty(java.lang.String)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.086  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [protected final javax.servlet.ServletContext org.springframework.web.filter.GenericFilterBean.getServletContext()] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.108  INFO 8348 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/account/api/login/**'], [org.springframework.security.web.context.SecurityContextPersistenceFilter@7895c1d8, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3dbe97d9, org.springframework.security.web.header.HeaderWriterFilter@3d848b02, com.tjiptv.iptvuser.service.oauth2.CustomClientCredentialsTokenEndpointFilter@32c5fceb, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@795231bd, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@1bdaeeba, org.springframework.security.web.access.ExceptionTranslationFilter@659a53a3, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@255f1734]
2016-12-20 13:31:21.120  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.setRequiresAuthenticationRequestMatcher(org.springframework.security.web.util.matcher.RequestMatcher)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.120  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.web.filter.GenericFilterBean.init(javax.servlet.FilterConfig) throws javax.servlet.ServletException] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.120  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [protected final java.lang.String org.springframework.web.filter.GenericFilterBean.getFilterName()] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.120  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.web.filter.GenericFilterBean.setBeanName(java.lang.String)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.120  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final javax.servlet.FilterConfig org.springframework.web.filter.GenericFilterBean.getFilterConfig()] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.120  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.web.filter.GenericFilterBean.setServletContext(javax.servlet.ServletContext)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.120  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [protected final void org.springframework.web.filter.GenericFilterBean.addRequiredProperty(java.lang.String)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.120  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [protected final javax.servlet.ServletContext org.springframework.web.filter.GenericFilterBean.getServletContext()] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.137  INFO 8348 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/sendSmsCode'], [org.springframework.security.web.context.SecurityContextPersistenceFilter@6548021c, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@7014f38b, org.springframework.security.web.header.HeaderWriterFilter@7632aeff, com.tjiptv.iptvuser.service.oauth2.CustomClientSmsFilter@182f8215, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@6fe59f52, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@fa1d033, org.springframework.security.web.access.ExceptionTranslationFilter@2e5e12a7, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@3f912598]
2016-12-20 13:31:21.159  INFO 8348 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/oauth/check_token'], [org.springframework.security.web.context.SecurityContextPersistenceFilter@31d47510, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@170975eb, org.springframework.security.web.header.HeaderWriterFilter@627d8763, org.springframework.security.web.csrf.CsrfFilter@3aea91a7, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@3d22dfe9, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@2fefbf44, org.springframework.security.web.access.ExceptionTranslationFilter@2924f17b, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2787300e]
2016-12-20 13:31:21.324  INFO 8348 --- [ost-startStop-1] c.t.wisetv.redis.client.RedisClient      : redis client init start~
2016-12-20 13:31:21.583  INFO 8348 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/oauth/logout'], [org.springframework.security.web.context.SecurityContextPersistenceFilter@3d2582c4, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3948ad0b, org.springframework.security.web.header.HeaderWriterFilter@57135ef7, org.springframework.security.web.csrf.CsrfFilter@59c46ae6, org.springframework.security.web.authentication.logout.LogoutFilter@24d39ceb, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@60400961, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@6b538863, org.springframework.security.web.session.SessionManagementFilter@392877f9, org.springframework.security.web.access.ExceptionTranslationFilter@5dfd59ae, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@9cd4d50]
2016-12-20 13:31:21.630  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.web.filter.GenericFilterBean.init(javax.servlet.FilterConfig) throws javax.servlet.ServletException] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.631  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [protected final java.lang.String org.springframework.web.filter.GenericFilterBean.getFilterName()] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.631  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.web.filter.GenericFilterBean.setBeanName(java.lang.String)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.631  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final javax.servlet.FilterConfig org.springframework.web.filter.GenericFilterBean.getFilterConfig()] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.631  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [public final void org.springframework.web.filter.GenericFilterBean.setServletContext(javax.servlet.ServletContext)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.631  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [protected final void org.springframework.web.filter.GenericFilterBean.addRequiredProperty(java.lang.String)] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.631  INFO 8348 --- [ost-startStop-1] o.s.aop.framework.CglibAopProxy          : Unable to proxy method [protected final javax.servlet.ServletContext org.springframework.web.filter.GenericFilterBean.getServletContext()] because it is final: All calls to this method via a proxy will NOT be routed to the target instance.
2016-12-20 13:31:21.645  INFO 8348 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.SecurityContextPersistenceFilter@3fafd3c, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@4ba0054a, org.springframework.security.web.header.HeaderWriterFilter@1c0b30aa, org.springframework.security.web.authentication.logout.LogoutFilter@48ef5856, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@7d8f7bcf, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@50c4ab69, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@5f67efaf, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@3bb0d32d, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@5fd202d9, com.tjiptv.iptvuser.service.oauth2.CustomConcurrentSessionFilter@3c50ccb8, org.springframework.security.web.session.SessionManagementFilter@52e1bb69, org.springframework.security.web.access.ExceptionTranslationFilter@2147d987, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@3fbc8105]
2016-12-20 13:31:21.658  INFO 8348 --- [ost-startStop-1] o.s.s.c.h.DefaultFilterChainValidator    : Checking whether login URL '/resources/html/login.html' is accessible with your configuration
2016-12-20 13:31:23.187  WARN 8348 --- [ost-startStop-1] o.s.s.c.h.DefaultFilterChainValidator    : Possible error: Filters at position 4 and 5 are both instances of org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
2016-12-20 13:31:23.335  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'metricsFilter' to: [/*]
2016-12-20 13:31:23.336  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-12-20 13:31:23.336  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2016-12-20 13:31:23.336  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'org.springframework.security.filterChainProxy' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#1' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#2' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#3' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#4' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'clientCredentialsTokenEndpointFilter' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'localResourceServer' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#5' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#6' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0' to: [/*]
2016-12-20 13:31:23.337  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'customUsernamePasswordAuthenticationFilter' to: [/*]
2016-12-20 13:31:23.338  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'customClientCredentialsTokenEndpointFilter' to: [/*]
2016-12-20 13:31:23.338  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'customClientSmsFilter' to: [/*]
2016-12-20 13:31:23.338  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'concurrencyFilter' to: [/*]
2016-12-20 13:31:23.338  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'applicationContextIdFilter' to: [/*]
2016-12-20 13:31:23.338  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2016-12-20 13:31:23.339  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2016-12-20 13:31:23.339  INFO 8348 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet was not registered (possibly already registered?)
2016-12-20 13:31:23.411 ERROR 8348 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Exception starting filter customClientCredentialsTokenEndpointFilter

java.lang.NullPointerException: null
    at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:176) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:109) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4572) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]

2016-12-20 13:31:23.412 ERROR 8348 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Exception starting filter concurrencyFilter

java.lang.NullPointerException: null
    at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:176) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:109) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4572) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]

2016-12-20 13:31:23.413 ERROR 8348 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Exception starting filter customClientSmsFilter

java.lang.NullPointerException: null
    at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:176) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:109) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4572) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]

2016-12-20 13:31:23.413 ERROR 8348 --- [ost-startStop-1] o.apache.catalina.core.StandardContext   : One or more Filters failed to start. Full details will be found in the appropriate container log file
2016-12-20 13:31:23.413 ERROR 8348 --- [ost-startStop-1] o.apache.catalina.core.StandardContext   : Context [] startup failed due to previous errors
2016-12-20 13:31:23.435  WARN 8348 --- [ost-startStop-1] o.a.c.loader.WebappClassLoaderBase       : The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)

The reason may be to start the project with a cglib proxy instantiation filter, custom filter some of the parent class final method or attribute can not be instantiated,so that those filters initial failure.

Here is part of the security configuration file about one of the custom filters:

<http pattern="/account/api/login/**" create-session="stateless" authentication-manager-ref="oauth2AuthenticationManager"
      entry-point-ref="oauth2AuthenticationEntryPoint" use-expressions="false">
    <csrf disabled="true"/>
    <intercept-url pattern="/account/api/login/**" access="IS_AUTHENTICATED_FULLY"/>
    <anonymous enabled="false"/>
    <http-basic entry-point-ref="oauth2AuthenticationEntryPoint"/>
    <custom-filter ref="customClientCredentialsTokenEndpointFilter" before="BASIC_AUTH_FILTER"/>
    <access-denied-handler ref="oauth2AccessDeniedHandler"/>
</http>
<beans:bean id="customClientCredentialsTokenEndpointFilter"
            class="com.tjiptv.iptvuser.service.oauth2.CustomClientCredentialsTokenEndpointFilter">
    <beans:property name="sessionAuthenticationStrategy" ref="sessionAuthenticationStrategy" />
    <beans:property name="authenticationManager" ref="oauth2AuthenticationManager"/>
    <beans:property name="failureHandler" ref="customAuthFailureHandler"/>
</beans:bean>

CustomClientCredentialsTokenEndpointFilter.java

public class CustomClientCredentialsTokenEndpointFilter extends AbstractAuthenticationProcessingFilter {


private AuthenticationFailureHandler failureHandler;

private String filterProcessesUrl;

public CustomClientCredentialsTokenEndpointFilter() {
    this("/account/api/login");
}


public CustomClientCredentialsTokenEndpointFilter(String defaultFilterProcessesUrl) {
    super(defaultFilterProcessesUrl);
    this.filterProcessesUrl = defaultFilterProcessesUrl;
}


@Override
public void afterPropertiesSet() {
    super.afterPropertiesSet();
    setAuthenticationSuccessHandler(new AuthenticationSuccessHandler() {
        public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
                Authentication authentication) throws IOException, ServletException {
            // forward to social login controller
            request.getRequestDispatcher(UrlUtils.buildRequestUrl(request)).forward(request, response);
        }
    });
}
public AuthenticationFailureHandler getFailureHandler() {
    return failureHandler;
}

public void setFailureHandler(AuthenticationFailureHandler failureHandler) {
    this.failureHandler = failureHandler;
}

public String getFilterProcessesUrl(){
    return this.filterProcessesUrl;
}

}

Application.java

@EnableAutoConfiguration(exclude = AopAutoConfiguration.class)
@SpringBootApplication
@ComponentScan
@MapperScan("com.tjiptv.iptvuser.dao")
@ImportResource(locations={      "classpath:/public/spring/security.xml","classpath:/public/spring/redis.xml", "classpath:/public/spring/context.xml", "classpath:/public/spring/transaction.xml", "classpath:/public/mybatis.xml"})
public class Application extends SpringBootServletInitializer implements   EmbeddedServletContainerCustomizer{
public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
}

}

0

There are 0 answers