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

Handler dispatch error when using RedisTokenStore #1221

Closed
AmirBahrami opened this issue Nov 19, 2017 · 2 comments
Closed

Handler dispatch error when using RedisTokenStore #1221

AmirBahrami opened this issue Nov 19, 2017 · 2 comments

Comments

@AmirBahrami
Copy link

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.

@rieonke
Copy link

rieonke commented Nov 21, 2017

see #1230

@jgrandja
Copy link
Contributor

@AmirBahrami See comment.

You can explicitly declare your dependencies in your POM or gradle file to use spring-date-redis 2.0.1.RELEASE and jedis 2.9.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants