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

Conversation

@soulmachine
Copy link

In Spring Boot 2.0 I have the following error:

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) ~[spring-security-oauth2-2.2.1.RELEASE.jar:na]
	at org.springframework.security.oauth2.provider.token.DefaultTokenServices.createAccessToken(DefaultTokenServices.java:122) ~[spring-security-oauth2-2.2.1.RELEASE.jar:na]
	at org.springframework.security.oauth2.provider.token.DefaultTokenServices$$FastClassBySpringCGLIB$$5a1f25c.invoke(<generated>) ~[spring-security-oauth2-2.2.1.RELEASE.jar:na]
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.5.BUILD-SNAPSHOT.jar:5.0.5.BUILD-SNAPSHOT]
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:747) ~[spring-aop-5.0.5.BUILD-SNAPSHOT.jar:5.0.5.BUILD-SNAPSHOT]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.0.5.BUILD-SNAPSHOT.jar:5.0.5.BUILD-SNAPSHOT]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.5.BUILD-SNAPSHOT.jar:5.0.5.BUILD-SNAPSHOT]
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.5.BUILD-SNAPSHOT.jar:5.0.5.BUILD-SNAPSHOT]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.5.BUILD-SNAPSHOT.jar:5.0.5.BUILD-SNAPSHOT]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689) ~[spring-aop-5.0.5.BUILD-SNAPSHOT.jar:5.0.5.BUILD-SNAPSHOT]
	at org.springframework.security.oauth2.provider.token.DefaultTokenServices$$EnhancerBySpringCGLIB$$797b9d07.createAccessToken(<generated>) ~[spring-security-oauth2-2.2.1.RELEASE.jar:na]
	at com.coinokay.api.security.authentication.CoinokayAuthenticationSuccessHandler.onAuthenticationSuccess(CoinokayAuthenticationSuccessHandler.java:77) ~[classes/:na]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.successfulAuthentication(AbstractAuthenticationProcessingFilter.java:326) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:240) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]

After I replaced all conn.set() with conn.stringCommands().set() in RedisTokenStore.java, the error disappears.

@pivotal-issuemaster
Copy link

@soulmachine Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@jgrandja
Copy link
Contributor

Thanks for the PR @soulmachine.
However, we need to ensure the RedisTokenStore works for spring-data-redis 1.5.x to 2.x. I'm closing this PR in favour of #1319.

@jgrandja jgrandja closed this Mar 23, 2018
@pivotal-issuemaster
Copy link

@soulmachine Thank you for signing the Contributor License Agreement!

@soulmachine
Copy link
Author

@jgrandja Thanks, #1319 works with both spring-data-redis 1.5.x to 2.x, I prefer it too!

@godpit
Copy link

godpit commented Mar 28, 2018

spring-data-redis 2.0.5,spring security oauth 2.2.1,spring boot 2.0.0. Are you sure it was fixed? however, When can I use it normally?The class of LettuceConnection cannot find the method of ’org.springframework.data.redis.connection.RedisConnection.set([B[B)V‘

@jgrandja
Copy link
Contributor

@godpit This issue is fixed in 2.3.1, which is planned for release this week March 30.

@kibbled
Copy link

kibbled commented Apr 9, 2018

@jgrandja any news on that 2.3.1 release?

@jgrandja
Copy link
Contributor

jgrandja commented Apr 9, 2018

@kibbled Please see this comment

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants