MEDIARITHMICS / liquibase-clickhouse

Apache License 2.0
43 stars 39 forks source link

No suitable ClickHouse client(out of 0) found in classpath. #31

Open tkanos opened 1 year ago

tkanos commented 1 year ago

Hello guys,

I'm really trying hard to make it work, but I will need a bit of help if you can.

I'm using the master version of liquibase-clickhouse and the shaded jar Here is my liquibase.properties :

changeLogFile: /liquibase/changelog/root-changelog.xml
url: jdbc:clickhouse://my_hosted_clickhouse:8123
username: admin_rw
password: *************
classpath: /liquibase/changelog
driver: shaded.liquibase.com.clickhouse.jdbc.ClickHouseDriver
databaseClass: liquibase.ext.clickhouse.database.ClickHouseDatabase
strict: true

And I run liquibase on docker versio 4.15 like in the pom file:

 docker run -it --rm -v $(pwd)/liquibase/changelog:/liquibase/changelog -v$(pwd)/liquibase-clickhouse/target/liquibase-clickhouse-0.7.3-SNAPSHOT-shaded.jar:/liquibase/lib/clickhouse.jar liquibase/liquibase:4.15 --defaults-file=/liquibase/changelog/liquibase.properties --log-level=debug update

But I get the following error :

[2023-05-18 20:02:29] FINE [liquibase.database] Properties:
[2023-05-18 20:02:29] FINE [liquibase.database] Key:'user' Value:'admin_rw'
[2023-05-18 20:02:29] FINE [liquibase.database] Connecting to the URL:'jdbc:clickhouse://*************:8123' using driver:'shaded.liquibase.com.clickhouse.jdbc.ClickHouseDriver'
[2023-05-18 20:02:29] FINE [liquibase.servicelocator] Loaded liquibase.database.DatabaseConnection instance liquibase.database.jvm.JdbcConnection
[2023-05-18 20:02:29] FINE [liquibase.servicelocator] Loaded liquibase.database.DatabaseConnection instance com.datical.liquibase.ext.database.jvm.ProJdbcConnection
[2023-05-18 20:02:29] SEVERE [liquibase.integration] No suitable ClickHouse client(out of 0) found in classpath.
liquibase.exception.CommandExecutionException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.IllegalStateException: No suitable ClickHouse client(out of 0) found in classpath.
    at liquibase.command.CommandScope.execute(CommandScope.java:179)
    at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:51)
    at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:21)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
    at picocli.CommandLine.access$1300(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
    at picocli.CommandLine.execute(CommandLine.java:2078)
    at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$1(LiquibaseCommandLine.java:353)
    at liquibase.Scope.child(Scope.java:189)
    at liquibase.Scope.child(Scope.java:165)
    at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:318)
    at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:84)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at liquibase.integration.commandline.LiquibaseLauncher.main(LiquibaseLauncher.java:107)
Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.IllegalStateException: No suitable ClickHouse client(out of 0) found in classpath.
    at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:139)
    at liquibase.integration.commandline.Main.doMigration(Main.java:1485)
    at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:397)
    at liquibase.Scope.lambda$child$0(Scope.java:180)
    at liquibase.Scope.child(Scope.java:189)
    at liquibase.Scope.child(Scope.java:179)
    at liquibase.Scope.child(Scope.java:158)
    at liquibase.integration.commandline.Main$1.run(Main.java:396)
    at liquibase.integration.commandline.Main$1.run(Main.java:218)
    at liquibase.Scope.child(Scope.java:189)
    at liquibase.Scope.child(Scope.java:165)
    at liquibase.integration.commandline.Main.run(Main.java:218)
    at liquibase.command.AbstractCliWrapperCommandStep.run(AbstractCliWrapperCommandStep.java:33)
    at liquibase.command.CommandScope.execute(CommandScope.java:173)
    ... 20 more
Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.IllegalStateException: No suitable ClickHouse client(out of 0) found in classpath.
    at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:218)
    at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:176)
    at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:141)
    at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:93)
    ... 33 more
Caused by: liquibase.exception.DatabaseException: java.lang.IllegalStateException: No suitable ClickHouse client(out of 0) found in classpath.
    at liquibase.database.ConnectionServiceFactory.create(ConnectionServiceFactory.java:35)
    at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:215)
    ... 36 more
Caused by: java.lang.IllegalStateException: No suitable ClickHouse client(out of 0) found in classpath.
    at shaded.liquibase.com.clickhouse.client.ClickHouseClientBuilder.build(ClickHouseClientBuilder.java:103)
    at shaded.liquibase.com.clickhouse.jdbc.internal.ClickHouseConnectionImpl.<init>(ClickHouseConnectionImpl.java:185)
    at shaded.liquibase.com.clickhouse.jdbc.internal.ClickHouseConnectionImpl.<init>(ClickHouseConnectionImpl.java:168)
    at shaded.liquibase.com.clickhouse.jdbc.ClickHouseDriver.connect(ClickHouseDriver.java:145)
    at shaded.liquibase.com.clickhouse.jdbc.ClickHouseDriver.connect(ClickHouseDriver.java:41)
    at liquibase.database.jvm.JdbcConnection.open(JdbcConnection.java:83)
    at com.datical.liquibase.ext.database.jvm.ProJdbcConnection.open(Unknown Source)
    at liquibase.database.ConnectionServiceFactory.create(ConnectionServiceFactory.java:32)
    ... 37 more

Unexpected error running Liquibase: No suitable ClickHouse client(out of 0) found in classpath.

liquibase.exception.CommandExecutionException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.IllegalStateException: No suitable ClickHouse client(out of 0) found in classpath.
    at liquibase.command.CommandScope.execute(CommandScope.java:179)
    at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:51)
    at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:21)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
    at picocli.CommandLine.access$1300(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
    at picocli.CommandLine.execute(CommandLine.java:2078)
    at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$1(LiquibaseCommandLine.java:353)
    at liquibase.Scope.child(Scope.java:189)
    at liquibase.Scope.child(Scope.java:165)
    at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:318)
    at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:84)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at liquibase.integration.commandline.LiquibaseLauncher.main(LiquibaseLauncher.java:107)
Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.IllegalStateException: No suitable ClickHouse client(out of 0) found in classpath.
    at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:139)
    at liquibase.integration.commandline.Main.doMigration(Main.java:1485)
    at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:397)
    at liquibase.Scope.lambda$child$0(Scope.java:180)
    at liquibase.Scope.child(Scope.java:189)
    at liquibase.Scope.child(Scope.java:179)
    at liquibase.Scope.child(Scope.java:158)
    at liquibase.integration.commandline.Main$1.run(Main.java:396)
    at liquibase.integration.commandline.Main$1.run(Main.java:218)
    at liquibase.Scope.child(Scope.java:189)
    at liquibase.Scope.child(Scope.java:165)
    at liquibase.integration.commandline.Main.run(Main.java:218)
    at liquibase.command.AbstractCliWrapperCommandStep.run(AbstractCliWrapperCommandStep.java:33)
    at liquibase.command.CommandScope.execute(CommandScope.java:173)
    ... 20 more
Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.lang.IllegalStateException: No suitable ClickHouse client(out of 0) found in classpath.
    at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:218)
    at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:176)
    at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:141)
    at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:93)
    ... 33 more
Caused by: liquibase.exception.DatabaseException: java.lang.IllegalStateException: No suitable ClickHouse client(out of 0) found in classpath.
    at liquibase.database.ConnectionServiceFactory.create(ConnectionServiceFactory.java:35)
    at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:215)
    ... 36 more
Caused by: java.lang.IllegalStateException: No suitable ClickHouse client(out of 0) found in classpath.
    at shaded.liquibase.com.clickhouse.client.ClickHouseClientBuilder.build(ClickHouseClientBuilder.java:103)
    at shaded.liquibase.com.clickhouse.jdbc.internal.ClickHouseConnectionImpl.<init>(ClickHouseConnectionImpl.java:185)
    at shaded.liquibase.com.clickhouse.jdbc.internal.ClickHouseConnectionImpl.<init>(ClickHouseConnectionImpl.java:168)
    at shaded.liquibase.com.clickhouse.jdbc.ClickHouseDriver.connect(ClickHouseDriver.java:145)
    at shaded.liquibase.com.clickhouse.jdbc.ClickHouseDriver.connect(ClickHouseDriver.java:41)
    at liquibase.database.jvm.JdbcConnection.open(JdbcConnection.java:83)
    at com.datical.liquibase.ext.database.jvm.ProJdbcConnection.open(Unknown Source)
    at liquibase.database.ConnectionServiceFactory.create(ConnectionServiceFactory.java:32)
    ... 37 more
alexsivkovu commented 8 months ago

@tkanos hello, did you fix this problem? I have the same

iTem186 commented 7 months ago

@tkanos , @alexsivkovu , Hi! Have the same problem. Any information?

tkanos commented 7 months ago

Hello guys,

Nop I have not found a solution. Ultimately I am instead using https://github.com/golang-migrate/migrate . that works well so far.

BentsiLeviav commented 5 months ago

Could you please share your pom file?