Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchMethodError: org.flywaydb.core.api.configuration.FluentConfiguration #3484

Closed
javiyt opened this issue Jul 18, 2022 · 8 comments
Closed

Comments

@javiyt
Copy link

javiyt commented Jul 18, 2022

Which version and edition of Flyway are you using?

Flyway core 9.0.1

If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)

Yes

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Gradle plugin

Which database are you using? (Type & version)

PostgreSQL 12.2

Which operating system are you using?

Linux

What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)

Run migrations

What did you expect to see?

Can start spring boot application

What did you see instead?
Caused by:
                                    org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is java.lang.NoSuchMethodError: 'org.flywaydb.core.api.configuration.FluentConfiguration org.flywaydb.core.api.configuration.FluentConfiguration.ignoreMissingMigrations(boolean)'
                                        at app//org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
                                        at app//org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
                                        ... 168 more
                                        Caused by:
                                        java.lang.NoSuchMethodError: 'org.flywaydb.core.api.configuration.FluentConfiguration org.flywaydb.core.api.configuration.FluentConfiguration.ignoreMissingMigrations(boolean)'
                                            at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.configureIgnoredMigrations(FlywayAutoConfiguration.java:264)
                                            at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.configureProperties(FlywayAutoConfiguration.java:205)
                                            at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.flyway(FlywayAutoConfiguration.java:119)
                                            at jdk.internal.reflect.GeneratedMethodAccessor270.invoke(Unknown Source)
                                            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                            at java.base/java.lang.reflect.Method.invoke(Method.java:568)
                                            at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
                                            ... 169 more
@DoodleBobBuffPants
Copy link
Contributor

These methods were deprecated in V8 and are now replaced by ignoreMigrationPatterns

@xiaomaitai
Copy link

I assume this is a bug need to be fixed.We application developers didn't call these deprecated methods proactively.
I reverted the version to 8.5.13 and avoided this problem by the way.

@DoodleBobBuffPants
Copy link
Contributor

It isn't a bug - Spring Boot will need to update to support the latest major version of Flyway

@billyshen26
Copy link

It isn't a bug - Spring Boot will need to update to support the latest major version of Flyway

i tried Spring Boot 2.7.2. Flyway 9.1.3 ,got the same issue. any advice?

@billyshen26
Copy link

WX20220816-225844@2x

@javiyt
Copy link
Author

javiyt commented Aug 17, 2022

It would be fixed in Spring 2.7.3, see spring-projects/spring-boot#32034 for more information

@billyshen26
Copy link

got it ,thx

@Yangyy99
Copy link

i tried Spring Boot 3.0.2 Flyway 9.20.1 , PostgreSQL 15 ,got the same issue.

snhr-1019 added a commit to snhr-1019/task-app-example that referenced this issue Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants