5

I am writing simple application to be familiar with spring batch. I wanted to learn spring batch admin but I found that it is deprecated so I have to use spring cloud data flow instead.

I've found a tutorial about spring cloud data and did first steps:

  1. Added dependency:

    compile("org.springframework.cloud:spring-cloud-starter-dataflow-server-local:1.7.4.RELEASE")

  2. And marked my spring boot application class with additioanl annotaion:

    @EnableDataFlowServer

Now I am trying to run it using idea but it prints:

10:24:09.590 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:161)
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:102)
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:68)
    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:75)
    at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
    at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:340)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:304)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202)
    at spring.boot.hello.world.MyApplication.main(MyApplication.java:11)
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

1 Answers1

0

In most of the cases this is either due to a missing dependency or due to a dependency coming with an older spring/spring boot version. Check your maven dependency tree and search for spring-boot dependencies older then the version your parent starter is requesting. Probably org.springframework.cloud:spring-cloud-starter-dataflow-server-local:1.7.4.RELEASE comes with an older version and you need to exclude it.

Jan Schumacher
  • 309
  • 2
  • 11