spring-cloud / spring-cloud/spring-cloud-config

Regarding spring boot project java 17 upgrade

Open
#2,320 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
2k
Forks
1.3k
Avg merge
2d 59m
Merged PRs (30d)
16

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the versions of spring-cloud-context and spring-boot shown in the startup error, focusing on BootstrapApplicationListener and SpringApplicationBuilder. Reproduce the application startup with the reported classpath and determine whether compatible dependency versions are documented or supported; done means the project starts without this method-linkage failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.