0
votes

I am in the process of updating my project from Spring Boot 1.5.8 to Spring Boot 2.0.x. As part of that exercise, I've run into the following exception when I attempt to login (caching oauth2 tokens using Redis).

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

I have been looking at the following interconnected sets of github issues addressing this:

https://github.com/spring-projects/spring-security-oauth/issues/1230 https://github.com/spring-projects/spring-security-oauth/issues/1335

...and various PRs around them.

The bottom line seems to be that this is fixed in spring-security-oauth version 2.3.2.RELEASE.

My question is this:

I don't use spring-security-oauth directly in my pom.xml. Instead, we use spring-security-oauth2-autoconfigure, which, I believe drags in spring-security-oauth2.2.2.1.RELEASE (according to my dependency list, see below).

Is there any good way to bring in the fixed spring-security-oauth version instead? Or does anyone know if this will be brought into spring-security-oauth2-autoconfigure soon?

1

1 Answers

0
votes

OK, I worked around this in my pom.xml as follows

    <dependency>
        <groupId>org.springframework.security.oauth</groupId>
        <artifactId>spring-security-oauth2</artifactId>
        <version>2.3.2.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security.oauth.boot</groupId>
        <artifactId>spring-security-oauth2-autoconfigure</artifactId>
        <version>2.0.1.RELEASE</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework.security.oauth</groupId>
                <artifactId>spring-security-oauth2</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

My second question stands: are there plans to move 2.3.2.RELEASE spring-security-oauth into spring-security-oauth2-autoconfigure eventually?