路径为[]的上下文中的Servlet [dispatcherServlet]的Spring-boot Servlet.service()抛出异常

时间:2018-10-25 14:17:19

标签: spring-boot

我有一个Spring Boot应用程序,它引发以下错误:

  

在路径为[]的上下文中,用于servlet [dispatcherServlet]的Servlet.service()抛出异常

这是NullPointerException,但我不知道怎么做

  

java.lang.NullPointerException:空       在org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices.processAutoLoginCookie(TokenBasedRememberMeServices.java:134)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices.autoLogin(AbstractRememberMeServices.java:130)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:98)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)〜[spring-security-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]       在org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)〜[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)〜[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)上[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:798)[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1434)[tomcat-embed-core-8.5.11.jar:8.5.11]       在org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)上[tomcat-embed-core-8.5.11.jar:8.5.11]       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[na:1.8.0_181]       在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)[na:1.8.0_181]       在org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-8.5.11.jar:8.5.11]       在java.lang.Thread.run(Thread.java:748)[na:1.8.0_181]

0 个答案:

没有答案