-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
When Using Liquibase with "quarkus.liquibase.clean-at-start=true" a RuntimeException Is Thrown in Quarkus 3.10.0 #40574
Comments
I've replicated the error locally. It fails with 3.10.0 but works fine with 3.9.5. |
3.9.5:
3.10.0:
|
This looks like an issue related to task to create the database lock table not firing, or an ordering issue, where releasing database lock is executing before the create database lock table. Looking at what was fixed in 3.10.0 https://github.com/quarkusio/quarkus/milestone/325?closed=1, nothing stands out immediately as a culprit for this issue. |
Describe the bug
At App startup an exception is thrown and the program exits, when using Liquibase with
quarkus.liquibase.clean-at-start=true
set.This happens at least with Postgresql and H2.
The issue didn't occur before Quarkus 3.10.0
The problem happens for a local as well as an in-container build.
For Postgres, the following error is logged:
and the following exception is thrown:
For H2 the log contains:
and the exception is:
Expected behavior
The DB is migrated and the app successfully started.
Actual behavior
An Exception is thrown, the DB isn't migrated and the application exits.
How to Reproduce?
To reproduce the error with Postgresql:
liquibase-quickstart
from thequarkus-quickstarts
repo.<artifactId>quarkus-jdbc-h2</artifactId>
to<artifactId>quarkus-jdbc-postgresql</artifactId>
inpom.xml
.%prod.quarkus.datasource.db-kind=postgresql
and the url to%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/test
inapplication.properties
.docker run -d --rm --name=test-db -p 0.0.0.0:5432:5432 -e POSTGRES_USER=sa -e POSTGRES_PASSWORD=sa -e POSTGRES_DB=test postgres:16.2
mvn clean package -Dnative -DskipTests
../target/liquibase-quickstart-1.0.0-SNAPSHOT-runner
.You can use similar steps to reproduce the error with H2.
Output of
uname -a
orver
Darwin 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:05 PDT 2024; root:xnu-10063.101.17~1/RELEASE_X86_64 x86_64
Output of
java -version
java 21.0.3 2024-04-16 LTS Java(TM) SE Runtime Environment Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37, mixed mode, sharing)
Mandrel or GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.10.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Additional information
No response
The text was updated successfully, but these errors were encountered: