title: 2022-09-19 09:42:03.038 ERROR 115707 --- [ main] o.s.boot.SpringApplication : Application run failed
body: <p>If I start the spring boot project it comes this error:</p>
  <pre><code>2022-09-19 09:42:03.038 ERROR 115707 --- [           main] o.s.boot.SpringApplication               : Application run failed
  
  &gt; org.springframework.beans.factory.BeanCreationException: Error
  &gt; creating bean with name 'flywayInitializer' defined in class path
  &gt; resource
  &gt; [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]:
  &gt; Invocation of init method failed; nested exception is
  &gt; org.flywaydb.core.api.FlywayException: Found non-empty schema(s)
  &gt; `zeiterfassung` but no schema history table. Use baseline() or set
  &gt; baselineOnMigrate to true to initialize the schema history table.     at
  &gt; org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     at
  &gt; org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     at
  &gt; org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     at
  &gt; org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     at
  &gt; org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     at
  &gt; org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     at
  &gt; org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     at
  &gt; org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     at
  &gt; org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     at
  &gt; org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154)
  &gt; ~[spring-context-5.3.22.jar:5.3.22]   at
  &gt; org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908)
  &gt; ~[spring-context-5.3.22.jar:5.3.22]   at
  &gt; org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
  &gt; ~[spring-context-5.3.22.jar:5.3.22]   at
  &gt; org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
  &gt; ~[spring-boot-2.7.3.jar:2.7.3]    at
  &gt; org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
  &gt; ~[spring-boot-2.7.3.jar:2.7.3]    at
  &gt; org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
  &gt; ~[spring-boot-2.7.3.jar:2.7.3]    at
  &gt; org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
  &gt; ~[spring-boot-2.7.3.jar:2.7.3]    at
  &gt; org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
  &gt; ~[spring-boot-2.7.3.jar:2.7.3]    at
  org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66)
  &gt; ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]  at
  &gt; org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     at
  &gt; org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
  &gt; ~[spring-beans-5.3.22.jar:5.3.22]     ... 18 common frames omitted
  &gt; 
  &gt; 
  &gt; Process finished with exit code 1
  </code></pre>
  <p>but this is the only error code that exists.</p>
  <p><strong>pom.xml</strong></p>
  <pre><code>  &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
      &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
               xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&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.7.3&lt;/version&gt;
              &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
          &lt;/parent&gt;
          &lt;groupId&gt;ch.ejpd&lt;/groupId&gt;
          &lt;artifactId&gt;backend-zeiterfassung&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;name&gt;backend-zeiterfassung&lt;/name&gt;
          &lt;description&gt;backend for our project, zeiterfassung&lt;/description&gt;
          &lt;properties&gt;
              &lt;java.version&gt;17&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-data-jpa&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.flywaydb&lt;/groupId&gt;
                  &lt;artifactId&gt;flyway-core&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.flywaydb&lt;/groupId&gt;
                  &lt;artifactId&gt;flyway-mysql&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.mariadb.jdbc&lt;/groupId&gt;
                  &lt;artifactId&gt;mariadb-java-client&lt;/artifactId&gt;
                  &lt;scope&gt;runtime&lt;/scope&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;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&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;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.flywaydb&lt;/groupId&gt;
                      &lt;artifactId&gt;flyway-maven-plugin&lt;/artifactId&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
      &lt;/project&gt;
  </code></pre>
  <p>This is an maven project with docker, flyway and a mariadb.</p>
  <p>The connetction to the db is flawless. The same with flyway.</p>
  <p>In the pom file i have an error that make no sense. It says nothing it is only red</p>
  <p><a href="https://i.stack.imgur.com/cw6Up.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cw6Up.png" alt="error pom file" /></a></p>