Here is my use case and issue with liquibase-core-4.23:
I’ve created an extension to allow me to use TrinoSql as my Database, all seems to work fine when I run liquibase using my java Main class from eclipse and calling liquibase update by setting all as needed (see below)
Then I build fat jar-file-with-dependencies which has it all loaded, when run from command line calling my Main class I got the following exception
$ java -jar liquibase-trino-1.0.0-jar-with-dependencies.jar -i examples/liquibase-trino.properties
Jul. 19, 2023 3:49:54 P.M. liquibase.ext
INFO: Set default schema name to sinDB
Jul. 19, 2023 3:50:00 P.M. liquibase.command
INFO: Command execution complete
liquibase.exception.CommandExecutionException: liquibase.exception.LockException: java.lang.IllegalStateException: Cannot find generators for database class liquibase.ext.trino.database.TrinoDatabase, statement: SELECT COUNT(*) FROM sinDB.DATABASECHANGELOGLOCK
liquibase.ext.trino.lockservice.TrinoLockService.acquireLock(TrinoLockService.java:135)
…
my Main class call this:
TrinoDatabase trinoDatabase = new TrinoDatabase();
try (Connection connection = DriverManager.getConnection(
"jdbc:trino://trinocoord1:8443/iceberg/sinDB","admin", "")) {
trinoDatabase.setConnection(new JdbcConnection(connection));
DatabaseFactory databaseFactory = Scope.getCurrentScope().getSingleton(DatabaseFactory.class);
databaseFactory.register(trinoDatabase);
Database database = databaseFactory.findCorrectDatabaseImplementation(trinoDatabase.getConnection());
Liquibase liquibase = new Liquibase("examples/db.changelog.xml", new ClassLoaderResourceAccessor(),
database);
liquibase.update();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
AGAIN: it works fine when running into Eclipse IDE