com.tagxle.core.web.error.ExceptionHandlingController: Exception thrown: Missing request header 'Authorization' for method parameter of type Stringorg.springframework.web.bind.ServletRequestBindingException: Missing request header 'Authorization' for method parameter of type String

Stack Overflow | Son Goku | 3 months ago
  1. 0

    Invalid Access Token when using Spring OAuth 2.0 Password Grant with JWT

    Stack Overflow | 3 months ago | Son Goku
    com.tagxle.core.web.error.ExceptionHandlingController: Exception thrown: Missing request header 'Authorization' for method parameter of type Stringorg.springframework.web.bind.ServletRequestBindingException: Missing request header 'Authorization' for method parameter of type String

    Root Cause Analysis

    1. com.tagxle.core.web.error.ExceptionHandlingController

      Exception thrown: Missing request header 'Authorization' for method parameter of type Stringorg.springframework.web.bind.ServletRequestBindingException: Missing request header 'Authorization' for method parameter of type String

      at org.springframework.web.method.annotation.RequestHeaderMethodArgumentResolver.handleMissingValue()
    2. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.annotation.RequestHeaderMethodArgumentResolver.handleMissingValue(RequestHeaderMethodArgumentResolver.java:82)
      2. org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.handleMissingValue(AbstractNamedValueMethodArgumentResolver.java:208)
      3. org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:104)
      4. org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121)
      5. org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:161)
      6. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:128)
      6 frames
    3. Spring MVC
      FrameworkServlet.doPost
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
      8. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
      8 frames
    4. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
      1 frame
    5. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
      1 frame
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      1 frame
    7. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    8. Tomcat WS
      WsFilter.doFilter
      1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      1 frame
    9. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    10. org.springframework.boot
      ApplicationContextHeaderFilter.doFilterInternal
      1. org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
      1 frame
    11. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    12. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    13. org.springframework.cloud
      TraceFilter.doFilter
      1. org.springframework.cloud.sleuth.instrument.web.TraceFilter.doFilter(TraceFilter.java:156)
      1 frame
    14. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    15. Spring Boot Actuator
      WebRequestTraceFilter.doFilterInternal
      1. org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105)
      1 frame
    16. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    17. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    18. Spring Security
      FilterChainProxy$VirtualFilterChain.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
      2. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
      3. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
      4. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      5. org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
      6. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      7. org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
      8. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      9. org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
      10. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      11. org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
      12. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      13. org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
      14. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      14 frames
    19. OAuth2 for Spring Security
      OAuth2AuthenticationProcessingFilter.doFilter
      1. org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:176)
      1 frame
    20. Spring Security
      FilterChainProxy$VirtualFilterChain.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      2. org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)
      3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      3 frames
    21. org.springframework.security
      HeaderWriterFilter.doFilterInternal
      1. org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
      1 frame
    22. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    23. Spring Security
      FilterChainProxy$VirtualFilterChain.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      2. org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
      3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      3 frames
    24. org.springframework.security
      WebAsyncManagerIntegrationFilter.doFilterInternal
      1. org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
      1 frame
    25. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    26. Spring Security
      FilterChainProxy.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      2. org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
      3. org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
      3 frames
    27. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
      2 frames
    28. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    29. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    30. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    31. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:87)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    32. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    33. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    34. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    35. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    36. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    37. Spring Boot Actuator
      MetricsFilter.doFilterInternal
      1. org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:107)
      1 frame
    38. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    39. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      8. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
      9 frames
    40. Grizzly HTTP
      SocketProcessorBase.run
      1. org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
      2. org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      3. org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
      4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
      5. org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      5 frames
    41. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2 frames
    42. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame
    43. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame