diff --git a/extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java b/extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java index 701861c858409..9aab0fc11a912 100644 --- a/extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java +++ b/extensions/flyway/deployment/src/main/java/io/quarkus/flyway/FlywayProcessor.java @@ -53,6 +53,7 @@ import io.quarkus.deployment.builditem.ServiceStartBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; +import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem; import io.quarkus.deployment.recording.RecorderContext; import io.quarkus.flyway.runtime.FlywayBuildTimeConfig; import io.quarkus.flyway.runtime.FlywayContainerProducer; @@ -276,4 +277,12 @@ private FileSystem initFileSystem(final URI uri) throws IOException { return FileSystems.newFileSystem(uri, env); } + /** + * Reinitialize {@code InsertRowLock} to avoid using a cached seed when invoking {@code getNextRandomString} + */ + @BuildStep + public RuntimeReinitializedClassBuildItem reinitInsertRowLock() { + return new RuntimeReinitializedClassBuildItem( + "org.flywaydb.core.internal.database.InsertRowLock"); + } } diff --git a/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/graal/FeatureDetectorSubstitutions.java b/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/graal/FeatureDetectorSubstitutions.java index a6e896505c636..ea58bdce93382 100644 --- a/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/graal/FeatureDetectorSubstitutions.java +++ b/extensions/flyway/runtime/src/main/java/io/quarkus/flyway/runtime/graal/FeatureDetectorSubstitutions.java @@ -42,4 +42,9 @@ public boolean isAndroidAvailable() { return false; } + @Substitute + public boolean isLog4J2Available() { + return false; + } + }