title: CLOSED - Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.2.RELEASE:run
body: <p>I try to run a Spring Cloud Data Flow app with a Kafka message broker but the <code>mvn spring-boot:run</code> always fail..
  <code>Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.2.RELEASE:run (default-cli) on project spring-data-flow-server: An exception occurred while running. null: InvocationTargetException: org.springframework.boot.builder.SpringApplicationBuilder.&lt;init&gt;([Ljava/lang/Object;)V -&gt; [Help 1]</code></p>
  
  <p>Does someone know this issue?</p>
  
  <p>Here is my log : </p>
  
  <pre><code>[WARNING]java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
      at java.lang.Thread.run (Thread.java:748)
  Caused by: java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.&lt;init&gt;([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:54)
      at org.springframework.boot.SpringApplication.prepareEnvironment (SpringApplication.java:347)
      at org.springframework.boot.SpringApplication.run (SpringApplication.java:306)
      at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
      at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
      at org.baeldung.spring.cloud.springdataflowserver.SpringDataFlowServerApplication.main (SpringDataFlowServerApplication.java:12)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
      at java.lang.Thread.run (Thread.java:748)
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  10.734 s
  [INFO] Finished at: 2019-01-31T17:01:58+01:00
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.2.RELEASE:run (default-cli) on project spring-data-flow-server: An exception occurred while running. null: InvocationTargetException: org.springframework.boot.builder.SpringApplicationBuilder.&lt;init&gt;([Ljava/lang/Object;)V -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>My pom.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.1.2.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;org.baeldung.spring.cloud&lt;/groupId&gt;
      &lt;artifactId&gt;spring-data-flow-server&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;spring-boot-starter-parent&lt;/name&gt;
      &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Dataflow local server dependency --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-dataflow-server-local&lt;/artifactId&gt;
              &lt;version&gt;1.6.1.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1.2.RELEASE&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>And here is the MainClass :</p>
  
  <pre><code>package org.baeldung.spring.cloud.springdataflowserver;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.cloud.dataflow.server.EnableDataFlowServer;
  
  @EnableDataFlowServer
  @SpringBootApplication
  public class SpringDataFlowServerApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(
                  SpringDataFlowServerApplication.class, args);
      }
  
  }
  </code></pre>
  
  <p>This is the Baeldung tuto (<a href="https://www.baeldung.com/spring-cloud-data-flow-stream-processing" rel="nofollow noreferrer">https://www.baeldung.com/spring-cloud-data-flow-stream-processing</a>)
  I've tried everything I've found on the Internet, but nothing worked..
  Even if I try a <code>mvn -X spring-boot:run</code> with the Baeldung code, I've the same issue..</p>
  
  <p>PS 01/02/2018 :
  I've updated my pom.xml and that fixed the issue. Here is my new pom.xml (changed the version of Spring Boot)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.5.16.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;org.baeldung.spring.cloud&lt;/groupId&gt;
      &lt;artifactId&gt;spring-data-flow-server&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;spring-boot-starter-parent&lt;/name&gt;
      &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Dataflow local server dependency --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-dataflow-server-local&lt;/artifactId&gt;
              &lt;version&gt;1.7.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1.2.RELEASE&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>