How to migrate from 5.3.10.RELEASE to 5.4.0 and 5.7.12 eventually?
Why - to fix a security vulnerability.
pom.xml
<dependencies>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-core</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-resource-server</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-jose</artifactId>
<version>${org.springframework.version}</version>
</dependency>
</dependencies>
When I upgrade, I see the following error -
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'conversionServicePostProcessor' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.beans.factory.config.BeanFactoryPostProcessor]: Factory method 'conversionServicePostProcessor' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.convert.converter.Converter.andThen(Lorg/springframework/core/convert/converter/Converter;)Lorg/springframework/core/convert/converter/Converter;
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.beans.factory.config.BeanFactoryPostProcessor]: Factory method 'conversionServicePostProcessor' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.convert.converter.Converter.andThen(Lorg/springframework/core/convert/converter/Converter;)Lorg/springframework/core/convert/converter/Converter;
Caused by: java.lang.NoSuchMethodError: org.springframework.core.convert.converter.Converter.andThen(Lorg/springframework/core/convert/converter/Converter;)Lorg/springframework/core/convert/converter/Converter;
Comment From: bclozel
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.
In this case, Spring Framework 5.4.0 and 5.7.12 do not exist, see https://spring.io/projects/spring-framework#support.