-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Milestone
Description
Describe the bug
Quarkus-Flyway is missing internals when native compiled.
When running quarkus flyway with migrate on start and retries enabled and the database not being available Quarkus throws a no such method exception (See log copy paste below)
Expected behavior
Should run retries
Actual behavior
Throws an error
To Reproduce
Steps to reproduce the behavior:
- Create a standard quarkus app > 3.23 with quarkus-flyway and quarkus-jdbc-postgresql
- Add a migration folder to resources\db\migration
- Set in the config
- quarkus.flyway.migrate-at-start=true
- quarkus.flyway.baseline-on-migrate=true
- quarkus.flyway.connect-retries=10
- quarkus.flyway.repair-at-start=true
- build with mvn clean package -DskipTests -Pnative -D"quarkus.native.container-build=true" -D"quarkus.container-image.build=true"
- run native app or docker container
Screenshots
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2025-09-16 21:21:16,997 WARN [io.qua.config] (main) Unrecognized configuration key "quarkus.http.host" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2025-09-16 21:21:17,003 WARN [io.agr.pool] (agroal-11) Datasource '<default>': Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
2025-09-16 21:21:17,004 ERROR [io.qua.run.Application] (main) Failed to start application: java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:119)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:80)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:51)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:144)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
Caused by: java.lang.NoSuchMethodException: org.flywaydb.core.internal.exception.sqlExceptions.FlywaySqlServerUntrustedCertificateSqlException.isFlywaySpecificVersionOf(java.sql.SQLException)
at [email protected]/java.lang.Class.checkMethod(DynamicHub.java:1078)
at [email protected]/java.lang.Class.getMethod(DynamicHub.java:1063)
at org.flywaydb.core.internal.exception.FlywaySqlException.throwFlywayExceptionIfPossible(FlywaySqlException.java:81)
at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:67)
at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:76)
at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:137)
at org.flywaydb.core.Flyway.repair(Flyway.java:461)
at io.quarkus.flyway.runtime.FlywayRecorder.doStartActions(FlywayRecorder.java:147)
at io.quarkus.runner.recorded.FlywayProcessor$startActions1575138505.deploy_0(Unknown Source)
at io.quarkus.runner.recorded.FlywayProcessor$startActions1575138505.deploy(Unknown Source)
... 7 more
Environment (please complete the following information):
- Browser:
- OS: Win 11/ Ubuntu server tested
Additional context
I've run a few tests the error is introduced in 3.24 (and is still present in 3.26) everything is fine up to 3.23.4.
It works fine in the java mode but not in native. I've tried to register the internals for reflection but not success.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
3.27.1