spring-attic / spring-security-oauth2-boot

Provides spring-security-oauth2 & Boot 2 integration (i.e. autoconfig)
Apache License 2.0
312 stars 144 forks source link

NoSuchMethodError.RedisConnection.set([B[B)V #16

Closed tangdu closed 6 years ago

tangdu commented 6 years ago

where use Springboot 2.0.0.Release & spring-security-oauth2-autoconfigure 2.0.1.BUILD-SNAPSHOT I think the problem is in lettuce

error mssaage is Caused by: java.lang.NoSuchMethodError: org.springframework.data.redis.connection.RedisConnection.set([B[B)V at org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore.storeAccessToken(RedisTokenStore.java:160) at org.springframework.security.oauth2.provider.token.DefaultTokenServices.createAccessToken(DefaultTokenServices.java:122) at org.springframework.security.oauth2.provider.token.AbstractTokenGranter.getAccessToken(AbstractTokenGranter.java:70)

my code is ` @Autowired private RedisConnectionFactory redisConnectionFactory;

@Bean public TokenStore tokenStore() { RedisTokenStore redisTokenStore = new RedisTokenStore(redisConnectionFactory); redisTokenStore.setPrefix("user-token:"); return redisTokenStore; } `

reith commented 6 years ago

@tangdu did you have any progress in this?

sis-yoshiday commented 6 years ago

I'm not reporter but suspect it below issue. https://github.com/spring-projects/spring-security-oauth/issues/1230

And was fixed in spring-security-oauth2:2.3.2, released at APRIL 12, 2018

jgrandja commented 6 years ago

@tangdu This has been resolved in the 2.3.2.RELEASE of spring-security-oauth2. See 1319 and 1335.

jzheaux commented 6 years ago

Hi, @ConnorLH, sorry you're having maven troubles. You can use mvn dependency:tree to see which dependency is wanting to bring in spring-security-oauth2.

This question is a bit better for StackOverflow, and I would recommend that you post there to get additional support.