-1

When trying to run my application i am getting an error like this

java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:120)
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:84)
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:1)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
    at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
    at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
    at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)

How solve this and run my application.

2
  • <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.6.RELEASE</version> <spring-cloud-netflix-core.version>1.1.7.RELEASE</spring-cloud-netflix-core.version> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-netflix-core</artifactId> <version>${spring-cloud-netflix-core.version}</version> </dependency> Commented Jan 12, 2024 at 10:55
  • You may want to check How to Ask Commented Jan 12, 2024 at 23:14

2 Answers 2

2

The version of Spring Boot that you are using is incompatible with the version of Spring Cloud that you are using. They are also both rather old and no longer supported. If you must use Spring Cloud Netflix 1.1.7.RELEASE then you should use Spring Boot 1.3.x with it.

Sign up to request clarification or add additional context in comments.

3 Comments

i need to have springboot version 2.2.6 , so which version of spring cloud should i use. I tried a few by still facing issue. If you could help me it would be great .@andy
Try 2.2.2.RELEASE
I tried 2.2.2.RELEASE ,but Unfortunately i am getting feign error , getting like this "package org.springframework.cloud does not exist" , and feign library import failed import org.springframework.cloud.netflix.feign.EnableFeignClients;
-1

Need to use import org.springframework.cloud.openfeign.EnableFeignClients; and include this

 <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
            <version>2.0.1.RELEASE</version>
        </dependency>

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.