Announcement Announcement Module
Collapse
No announcement yet.
Getting Null pointer exception, when accessing resource after access token expired. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting Null pointer exception, when accessing resource after access token expired.

    Getting following exception, when access token is expired and client is trying to access the resource. And after this movement no access token getting generated for that customer with the same client. Any help is much appreciated.






    11:08:50.008 [DEBUG] SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
    Jul 03, 2013 11:08:50 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [spring] in context with path [/vsvouch] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
    java.lang.NullPointerException
    at org.springframework.security.oauth2.provider.token .DefaultAuthenticationKeyGenerator.extractKey(Defa ultAuthenticationKeyGenerator.java:43)
    at org.springframework.security.oauth2.provider.token .InMemoryTokenStore.getAccessToken(InMemoryTokenSt ore.java:117)
    at org.springframework.security.oauth2.provider.token .DefaultTokenServices.createAccessToken(DefaultTok enServices.java:75)
    at com.limitedbrands.security.controller.LoginControl ler.login(LoginController.java:46)
    at com.limitedbrands.security.controller.LoginControl ler.loginJson(LoginController.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springframework.web.method.support.InvocableHa ndlerMethod.invoke(InvocableHandlerMethod.java:219 )
    at org.springframework.web.method.support.InvocableHa ndlerMethod.invokeForRequest(InvocableHandlerMetho d.java:132)
    at org.springframework.web.servlet.mvc.method.annotat ion.ServletInvocableHandlerMethod.invokeAndHandle( ServletInvocableHandlerMethod.java:104)
    at org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.invokeHandleMetho d(RequestMappingHandlerAdapter.java:745)
    at org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.handleInternal(Re questMappingHandlerAdapter.java:686)
    at org.springframework.web.servlet.mvc.method.Abstrac tHandlerMethodAdapter.handle(AbstractHandlerMethod Adapter.java:80)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:925)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:856)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:936)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:838)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:641)
    at org.springframework.web.servlet.FrameworkServlet.s ervice(FrameworkServlet.java:812)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 330)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.invoke(FilterSecurityInt erceptor.java:118)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.doFilter(FilterSecurityI nterceptor.java:84)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:113)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.authentication.An onymousAuthenticationFilter.doFilter(AnonymousAuth enticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.servletapi.Securi tyContextHolderAwareRequestFilter.doFilter(Securit yContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at com.limitedbrands.security.CustomRestSecurityFilte r.doFilter(CustomRestSecurityFilter.java:169)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.context.SecurityC ontextPersistenceFilter.doFilter(SecurityContextPe rsistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.FilterChainProxy. doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:160)
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:929)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.p rocess(AbstractHttp11Processor.java:1002)
    at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProce ssor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)

  • #2
    Complete trace..


    ****** 12:03:06.408 [DEBUG] AntPathRequestMatcher - Checking match of request : '/login'; against '/login'
    2013-07-03 12:03:06,408 DEBUG VSVUserDetailsService:43 loadUserByUsername - bmaganti
    ****** 12:03:06.408 [DEBUG] FilterChainProxy - /login at position 1 of 6 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
    ****** 12:03:06.408 [DEBUG] FilterChainProxy - /login at position 2 of 6 in additional filter chain; firing Filter: 'CustomRestSecurityFilter'
    ****** 12:03:06.408 [DEBUG] ProviderManager - Authentication attempt using org.springframework.security.authentication.dao.Da oAuthenticationProvider
    2013-07-03 12:03:06,408 DEBUG CustomerProfileService:53 getCustomerLoginInformation
    2013-07-03 12:03:06,409 DEBUG VSVCustomerDao:26 getCustomerLoginInformation
    2013-07-03 12:03:06,409 DEBUG SqlSessionUtils:47 Creating a new SqlSession
    2013-07-03 12:03:06,409 DEBUG SqlSessionUtils:47 SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSessi on@18c8204f] was not registered for synchronization because synchronization is not active
    2013-07-03 12:03:06,413 DEBUG SpringManagedTransaction:47 JDBC Connection [jdbc:db2://*****/***, UserName=***, IBM DB2 JDBC Universal Driver Architecture] will not be managed by Spring
    2013-07-03 12:03:06,414 DEBUG getCustomerLoginInformation:47 ooo Using Connection [jdbc:db2://********/*****, UserName=******, IBM DB2 JDBC Universal Driver Architecture]
    2013-07-03 12:03:06,414 DEBUG getCustomerLoginInformation:47 ==> Preparing: SELECT * FROM CLIENT.......
    2013-07-03 12:03:06,414 DEBUG getCustomerLoginInformation:47 ==> Parameters: bmaganti(String), bmaganti(String)
    2013-07-03 12:03:06,419 DEBUG SqlSessionUtils:47 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSessi on@18c8204f]
    2013-07-03 12:03:06,420 DEBUG VSVClientDetailsService:25 loadClientByClientId - *****
    2013-07-03 12:03:06,421 DEBUG ClientService:31 getClientDetails
    2013-07-03 12:03:06,421 DEBUG VSVClientDao:28 getClientDetails
    2013-07-03 12:03:06,421 DEBUG SqlSessionUtils:47 Creating a new SqlSession
    2013-07-03 12:03:06,421 DEBUG SqlSessionUtils:47 SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSessi on@a74b5ef] was not registered for synchronization because synchronization is not active
    2013-07-03 12:03:06,424 DEBUG SpringManagedTransaction:47 JDBC Connection [jdbc:db2:/******/**, UserName=***, IBM DB2 JDBC Universal Driver Architecture] will not be managed by Spring
    2013-07-03 12:03:06,425 DEBUG getClientDetails:47 ooo Using Connection [jdbc:db2://****/**, UserName=***, IBM DB2 JDBC Universal Driver Architecture]
    2013-07-03 12:03:06,425 DEBUG getClientDetails:47 ==> Preparing: SELECT * FROM CLIENT WHERE CLIENT_ID = ? FOR READ ONLY WITH UR
    2013-07-03 12:03:06,425 DEBUG getClientDetails:47 ==> Parameters: vsdirect(String)
    2013-07-03 12:03:06,429 DEBUG SqlSessionUtils:47 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSessi on@a74b5ef]
    ****** 12:03:06.430 [DEBUG] FilterChainProxy - /login at position 3 of 6 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
    ****** 12:03:06.430 [DEBUG] FilterChainProxy - /login at position 4 of 6 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
    ****** 12:03:06.430 [DEBUG] AnonymousAuthenticationFilter - SecurityContextHolder not populated with anonymous token, as it already contained: 'org.springframework.security.oauth2.provider.OAut h2Authentication@30277117: Principal: org.springframework.security.core.userdetails.User @f599b493: Username: bmaganti; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_USER; Credentials: [PROTECTED]; Authenticated: true; Details: null; Granted Authorities: ROLE_USER, ROLE_CLIENT'
    ****** 12:03:06.430 [DEBUG] FilterChainProxy - /login at position 5 of 6 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
    ****** 12:03:06.430 [DEBUG] FilterChainProxy - /login at position 6 of 6 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
    ****** 12:03:06.430 [DEBUG] AntPathRequestMatcher - Checking match of request : '/login'; against '/login'
    ****** 12:03:06.430 [DEBUG] FilterSecurityInterceptor - Secure object: FilterInvocation: URL: /login; Attributes: [ROLE_USER]
    ****** 12:03:06.430 [DEBUG] FilterSecurityInterceptor - Previously Authenticated: org.springframework.security.oauth2.provider.OAuth 2Authentication@30277117: Principal: org.springframework.security.core.userdetails.User @f599b493: Username: bmaganti; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_USER; Credentials: [PROTECTED]; Authenticated: true; Details: null; Granted Authorities: ROLE_USER, ROLE_CLIENT
    ****** 12:03:06.430 [DEBUG] AffirmativeBased - Voter: org.springframework.security.access.vote.RoleVoter @78707b06, returned: 1
    ****** 12:03:06.430 [DEBUG] FilterSecurityInterceptor - Authorization successful
    ****** 12:03:06.430 [DEBUG] FilterSecurityInterceptor - RunAsManager did not change Authentication object
    ****** 12:03:06.430 [DEBUG] FilterChainProxy - /login reached end of additional filter chain; proceeding with original chain
    ****** 12:03:06.430 [DEBUG] DispatcherServlet - DispatcherServlet with name 'spring' processing POST request for [/****/login]
    ****** 12:03:06.431 [DEBUG] RequestMappingHandlerMapping - Looking up handler method for path /login
    ****** 12:03:06.431 [DEBUG] RequestMappingHandlerMapping - Returning handler method [public java.lang.String com.limitedbrands.security.controller.LoginControl ler.loginJson(java.lang.String,java.security.Princ ipal)]
    2013-07-03 12:03:06,431 DEBUG LoginController:37 loginJson
    2013-07-03 12:03:06,432 DEBUG LoginController:45 login
    ****** 12:03:06.432 [DEBUG] ExceptionHandlerExceptionResolver - Resolving exception from handler [public java.lang.String com.limitedbrands.security.controller.LoginControl ler.loginJson(java.lang.String,java.security.Princ ipal)]: java.lang.NullPointerException
    ****** 12:03:06.432 [DEBUG] ResponseStatusExceptionResolver - Resolving exception from handler [public java.lang.String com.limitedbrands.security.controller.LoginControl ler.loginJson(java.lang.String,java.security.Princ ipal)]: java.lang.NullPointerException
    ****** 12:03:06.432 [DEBUG] DefaultHandlerExceptionResolver - Resolving exception from handler [public java.lang.String com.limitedbrands.security.controller.LoginControl ler.loginJson(java.lang.String,java.security.Princ ipal)]: java.lang.NullPointerException
    ****** 12:03:06.432 [DEBUG] DispatcherServlet - Could not complete request <java.lang.NullPointerException>java.lang.NullPoin terException
    at org.springframework.security.oauth2.provider.token .DefaultAuthenticationKeyGenerator.extractKey(Defa ultAuthenticationKeyGenerator.java:43)
    at org.springframework.security.oauth2.provider.token .InMemoryTokenStore.getAccessToken(InMemoryTokenSt ore.java:117)
    at org.springframework.security.oauth2.provider.token .DefaultTokenServices.createAccessToken(DefaultTok enServices.java:75)
    at com.limitedbrands.security.controller.LoginControl ler.login(LoginController.java:46)
    at com.limitedbrands.security.controller.LoginControl ler.loginJson(LoginController.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springframework.web.method.support.InvocableHa ndlerMethod.invoke(InvocableHandlerMethod.java:219 )
    at org.springframework.web.method.support.InvocableHa ndlerMethod.invokeForRequest(InvocableHandlerMetho d.java:132)
    at org.springframework.web.servlet.mvc.method.annotat ion.ServletInvocableHandlerMethod.invokeAndHandle( ServletInvocableHandlerMethod.java:104)
    at org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.invokeHandleMetho d(RequestMappingHandlerAdapter.java:745)
    at org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.handleInternal(Re questMappingHandlerAdapter.java:686)
    at org.springframework.web.servlet.mvc.method.Abstrac tHandlerMethodAdapter.handle(AbstractHandlerMethod Adapter.java:80)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:925)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:856)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:936)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:838)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:641)
    at org.springframework.web.servlet.FrameworkServlet.s ervice(FrameworkServlet.java:812)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 330)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.invoke(FilterSecurityInt erceptor.java:118)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.doFilter(FilterSecurityI nterceptor.java:84)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:113)

    Comment


    • #3
      at org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:113)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at org.springframework.security.web.authentication.An onymousAuthenticationFilter.doFilter(AnonymousAuth enticationFilter.java:113)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at org.springframework.security.web.servletapi.Securi tyContextHolderAwareRequestFilter.doFilter(Securit yContextHolderAwareRequestFilter.java:54)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at com.limitedbrands.security.CustomRestSecurityFilte r.doFilter(CustomRestSecurityFilter.java:169)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at org.springframework.security.web.context.SecurityC ontextPersistenceFilter.doFilter(SecurityContextPe rsistenceFilter.java:87)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at org.springframework.security.web.FilterChainProxy. doFilterInternal(FilterChainProxy.java:192)
      at org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:160)
      at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:346)
      at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:259)
      at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:929)
      at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.p rocess(AbstractHttp11Processor.java:1002)
      at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(AbstractProtocol.java:585)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProce ssor.run(JIoEndpoint.java:310)
      at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)

      ****** 12:03:06.432 [DEBUG] SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
      Jul 03, 2013 12:03:06 PM org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Servlet.service() for servlet [spring] in context with path [/******] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
      java.lang.NullPointerException
      at org.springframework.security.oauth2.provider.token .DefaultAuthenticationKeyGenerator.extractKey(Defa ultAuthenticationKeyGenerator.java:43)
      at org.springframework.security.oauth2.provider.token .InMemoryTokenStore.getAccessToken(InMemoryTokenSt ore.java:117)
      at org.springframework.security.oauth2.provider.token .DefaultTokenServices.createAccessToken(DefaultTok enServices.java:75)
      at com.limitedbrands.security.controller.LoginControl ler.login(LoginController.java:46)
      at com.limitedbrands.security.controller.LoginControl ler.loginJson(LoginController.java:38)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.springframework.web.method.support.InvocableHa ndlerMethod.invoke(InvocableHandlerMethod.java:219 )
      at org.springframework.web.method.support.InvocableHa ndlerMethod.invokeForRequest(InvocableHandlerMetho d.java:132)
      at org.springframework.web.servlet.mvc.method.annotat ion.ServletInvocableHandlerMethod.invokeAndHandle( ServletInvocableHandlerMethod.java:104)
      at org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.invokeHandleMetho d(RequestMappingHandlerAdapter.java:745)
      at org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.handleInternal(Re questMappingHandlerAdapter.java:686)
      at org.springframework.web.servlet.mvc.method.Abstrac tHandlerMethodAdapter.handle(AbstractHandlerMethod Adapter.java:80)
      at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:925)
      at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:856)
      at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:936)
      at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:838)
      at javax.servlet.http.HttpServlet.service(HttpServlet .java:641)
      at org.springframework.web.servlet.FrameworkServlet.s ervice(FrameworkServlet.java:812)
      at javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
      at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 330)
      at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.invoke(FilterSecurityInt erceptor.java:118)
      at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.doFilter(FilterSecurityI nterceptor.java:84)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:113)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at org.springframework.security.web.authentication.An onymousAuthenticationFilter.doFilter(AnonymousAuth enticationFilter.java:113)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at org.springframework.security.web.servletapi.Securi tyContextHolderAwareRequestFilter.doFilter(Securit yContextHolderAwareRequestFilter.java:54)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at com.limitedbrands.security.CustomRestSecurityFilte r.doFilter(CustomRestSecurityFilter.java:169)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at org.springframework.security.web.context.SecurityC ontextPersistenceFilter.doFilter(SecurityContextPe rsistenceFilter.java:87)
      at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
      at org.springframework.security.web.FilterChainProxy. doFilterInternal(FilterChainProxy.java:192)
      at org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:160)
      at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:346)
      at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:259)
      at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:929)
      at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.p rocess(AbstractHttp11Processor.java:1002)
      at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(AbstractProtocol.java:585)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProce ssor.run(JIoEndpoint.java:310)
      at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)

      Comment


      • #4
        I'm not sure your LoginController should be using the TokenServices directly. OAuth2RestTemplate is the normal way to access protected resources in a client app. Please use [code][/code] for logs and stack traces.

        Comment


        • #5
          How do i reset clock for access token?

          Comment


          • #6
            Not sure what you mean by "clock". Maybe you just need to refresh it (the OAuth2RestTemplate does that automcatically if a refresh token is available)?

            Comment

            Working...
            X