I have upgrade my spring boot project java version 8 to 17.And after upgraded, the project was not started.


APPLICATION FAILED TO START


Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:157)

The following method did not exist:

'void org.springframework.boot.builder.SpringApplicationBuilder.<init>(java.lang.Object[])'

The calling method's class, org.springframework.cloud.bootstrap.BootstrapApplicationListener, was loaded from the following location:

jar:file:/home/venkatesh/.m2/repository/org/springframework/cloud/spring-cloud-context/1.2.4.RELEASE/spring-cloud-context-1.2.4.RELEASE.jar!/org/springframework/cloud/bootstrap/BootstrapApplicationListener.class

The called method's class, org.springframework.boot.builder.SpringApplicationBuilder, is available from the following locations:

jar:file:/home/venkatesh/.m2/repository/org/springframework/boot/spring-boot/3.1.4-SNAPSHOT/spring-boot-3.1.4-SNAPSHOT.jar!/org/springframework/boot/builder/SpringApplicationBuilder.class

The called method's class hierarchy was loaded from the following locations:

org.springframework.boot.builder.SpringApplicationBuilder: file:/home/venkatesh/.m2/repository/org/springframework/boot/spring-boot/3.1.4-SNAPSHOT/spring-boot-3.1.4-SNAPSHOT.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.cloud.bootstrap.BootstrapApplicationListener and org.springframework.boot.builder.SpringApplicationBuilder