java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection

Stack Overflow | gonzalad | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Spring OAuth2 : tokenInfoUri generates ClassCastException with RFC 7662 endpoint

    Stack Overflow | 7 months ago | gonzalad
    java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection
  2. 0

    Allow single "aud" in JWT without need for JSON array format?

    GitHub | 2 years ago | sdoxsee
    java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection
  3. 0

    Using JWT token with accessTokenValiditySeconds throws exception

    GitHub | 3 years ago | patoi
    java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.String cannot be cast to java.util.Collection

      at org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter.extractAuthentication()
    2. OAuth2 for Spring Security
      OAuth2AuthenticationProcessingFilter.doFilter
      1. org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter.extractAuthentication(DefaultAccessTokenConverter.java:124)[spring-security-oauth2-2.0.9.RELEASE.jar:na]
      2. org.springframework.security.oauth2.provider.token.RemoteTokenServices.loadAuthentication(RemoteTokenServices.java:115)[spring-security-oauth2-2.0.9.RELEASE.jar:na]
      3. org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationManager.authenticate(OAuth2AuthenticationManager.java:83)[spring-security-oauth2-2.0.9.RELEASE.jar:na]
      4. org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:150)[spring-security-oauth2-2.0.9.RELEASE.jar:na]
      4 frames
    3. Spring Security
      FilterChainProxy$VirtualFilterChain.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE]
      2. org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE]
      3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE]
      3 frames
    4. org.springframework.security
      HeaderWriterFilter.doFilterInternal
      1. org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE]
      1 frame
    5. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.2.6.RELEASE.jar:4.2.6.RELEASE]
      1 frame
    6. Spring Security
      FilterChainProxy$VirtualFilterChain.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE]
      2. org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE]
      3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE]
      3 frames