-
Notifications
You must be signed in to change notification settings - Fork 513
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
Error: Could not initialize class ru.yandex.clickhouse.ClickHouseUtil when using with PySpark #138
Comments
ClickhouseUtil is just a simple class as ClickHousePreparedStatementImpl, which is loaded correctly according to the error message. In fact they are in the same package, so they must be packaged and loaded the same way. I'm not familiar with pyspark. Could you describe your settings on how you provide the clickhouse jdbc driver to your application? How do you get the driver? I think the default way for you, considering #137 , is to download jar from https://mvnrepository.com/artifact/ru.yandex.clickhouse/clickhouse-jdbc/0.1.28 and add some needed dependencies jars. All classes should be loaded correctly this way. |
Thanks! https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.2 https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore/4.4.4 https://mvnrepository.com/artifact/ru.yandex.clickhouse/clickhouse-jdbc/0.1.28 https://mvnrepository.com/artifact/com.google.guava/guava/19.0 https://mvnrepository.com/artifact/net.jpountz.lz4/lz4/1.3.0 https://mvnrepository.com/artifact/joda-time/joda-time/2.9.3
|
I'm getting same exception in my java application. I added it to my
And I'm packaging my application with dependecies. And when I start the |
I have the same error, but my issue got solved after adding the following parameters to pyspark comman : --jars jars/clickhouse-jdbc-0.2.4.jar,jars/guava-19.0.jar |
When I dump PySpark DataFrame to ClickHouse containing columns with types Integer, DateTime, Float, Date all works fine.
But when I try to dump DataFrame with String-typed column I get error.
My PySpark code:
Error:
What can I do with it?
I am not Java developer so I don't know how to compile and "import" class ru.yandex.clickhouse.ClickHouseUtil to my project.
There are some files in compiled repository
But there is no .jar files
Thanks in advance.
The text was updated successfully, but these errors were encountered: