Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.
This repository was archived by the owner on May 31, 2022. It is now read-only.

Handler dispatch error when using RedisTokenStore #1221

Closed
@AmirBahrami

Description

@AmirBahrami

I'm trying to use RedisTokenStore as default token store but error raised when requesting on /oauth/token for new token. I'm using spring-boot:2.0.0.M5, spring-security-oauth2:2.2.0.RELEASE and spring-data-redis:2.0.1.RELEASE
Error body is:

Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.springframework.data.redis.connection.RedisConnection.set([B[B)V

and I guessed it's related to oauth module because:

Resolving exception from handler [public org.springframework.http.ResponseEntity<org.springframework.security.oauth2.common.OAuth2AccessToken> org.springframework.security.oauth2.provider.endpoint.TokenEndpoint.postAccessToken(java.security.Principal,java.util.Map<java.lang.String, java.lang.String>) throws org.springframework.web.HttpRequestMethodNotSupportedException]: org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.springframework.data.redis.connection.RedisConnection.set([B[B)V

Bean configurations is as follows:
@Bean public JedisConnectionFactory redisConnectionFactory() { RedisStandaloneConfiguration configuration = new RedisStandaloneConfiguration(redisHostName, Integer.parseInt(redisPort)); return new JedisConnectionFactory(configuration); }

@Bean public TokenStore tokenStore() { return new RedisTokenStore(redisConnectionFactory()); }

I've also tested underlying redis connection and it works well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions