Shubham Shekhar
Shubham Shekhar

Reputation: 137

Getting Flywayautoconfiguration error when upgrading to flyway 10 and spring boot 3.1.5

I am trying to use latest version of flyway-core 10.0.0 in my pom.xml, with latest spring boot version 3.1.5 but when I run my test using flyway I get below error:-

An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.configureProperties(FlywayAutoConfiguration.java:254)

The following method did not exist:

'org.flywaydb.core.api.configuration.FluentConfiguration org.flywaydb.core.api.configuration.FluentConfiguration.licenseKey(java.lang.String)'

The calling method's class, org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration, was loaded from the following location:

jar:file:/C:/Users/sx8428/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.1.5/spring-boot-autoconfigure-3.1.5.jar!/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class

The called method's class, org.flywaydb.core.api.configuration.FluentConfiguration, is available from the following locations:

jar:file:/C:/Users/sx8428/.m2/repository/org/flywaydb/flyway-core/10.0.0/flyway-core-10.0.0.jar!/org/flywaydb/core/api/configuration/FluentConfiguration.class

The called method's class hierarchy was loaded from the following locations:

org.flywaydb.core.api.configuration.FluentConfiguration: file:/C:/Users/sx8428/.m2/repository/org/flywaydb/flyway-core/10.0.0/flyway-core-10.0.0.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration and org.flywaydb.core.api.configuration.FluentConfiguration

Upvotes: 4

Views: 3396

Answers (2)

AlistairW
AlistairW

Reputation: 76

Spring boot has to be updated to work with Flyway v10, it is on their radar: https://github.com/spring-projects/spring-boot/issues/38164

Upvotes: 3

roamerxv
roamerxv

Reputation: 41

Encountering the same issue!

flywaydb 10.0.0 spring boot 3.1.5. mysql 8.1

ps: flywaydb 9.22.3 is ok。

Upvotes: 3

Related Questions