Skip to content

Upgrade spring framework libraries to 5.4.0 to 5.3.10.RELEASE #33544

@surendragalwa

Description

@surendragalwa

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: stackoverflowA question that's better suited to stackoverflow.comstatus: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions