Skip to content

Method from JDK 10 not found while using clickhouse-jdbc in Spark application, running on JDK 8 #2816

@ejolos

Description

@ejolos

Description

Hi ClickHouse team,
I'm encountered an issue using clickhouse-jdbc from Spark application, Spark 3.x run on java 8.

Steps to reproduce

  1. Create a table in ClickHouse
  2. Try read from the table using spark.read.jdbc

Error Log or Exception StackTrace

method does not exist URLDecoder.decode(String, Charset) at com.clickhouse.jdbc.internal.JdbcConfiguration#222

Expected Behaviour

Spark application executes clickhouse table reading w/out errors.

Code Example

   try {
      val ds = spark.read.jdbc("jdbc:clickhouse://<host>:8123/<db>)", "select 1 from sks_data.sks_last_event limit 1", connectionProperties)
      ds.take(1)
    } catch {
      case e: Exception => throw new Exception(s"Target entity $entityName not found, by query '$query': ${e.getMessage}")
    }

Configuration

Client Configuration

Client is a spark application connecting via clickhouse-jdbc-0.9.8,

Additional libraries besides Spark distribution Hadoop and Spark libraries:
animal-sniffer-annotations-1.17.jar
antlr4-runtime-4.9.3.jar
asm-9.7.jar
cats-core_2.13-2.0.0.jar
cats-effect_2.13-2.0.0.jar
cats-kernel_2.13-2.8.0.jar
cats-macros_2.13-2.0.0.jar
checker-qual-2.5.2.jar
circe-core_2.13-0.12.0-M3.jar
circe-generic_2.13-0.12.0-M3.jar
circe-jawn_2.13-0.12.0-M3.jar
circe-numbers_2.13-0.12.0-M3.jar
circe-parser_2.13-0.12.0-M3.jar
circe-refined_2.13-0.12.0-M3.jar
clickhouse-client-0.9.8.jar
clickhouse-data-0.9.8.jar
clickhouse-http-client-0.9.8.jar
clickhouse-jdbc-0.9.8.jar
client-v2-0.9.8.jar

commons-codec-1.15.jar
commons-compress-1.28.0.jar
commons-io-2.20.0.jar
commons-lang3-3.20.0.jar
error_prone_annotations-2.2.0.jar
failureaccess-1.0.jar
httpclient5-5.4.4.jar
httpcore5-5.3.4.jar
httpcore5-h2-5.3.4.jar
j2objc-annotations-1.1.jar
jawn-parser_2.13-0.14.2.jar
jdbc-v2-0.9.8.jar
jline-3.21.0.jar
jna-5.9.0.jar
jspecify-1.0.0.jar
jsr305-3.0.0.jar
listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
lz4-java-1.10.4.jar
paranamer-2.8.jar
refined_2.13-0.9.8.jar
RoaringBitmap-1.0.6.jar
scalaj-http_2.13-2.4.2.jar
scala-logging_2.13-3.9.5.jar
scala-xml_2.13-2.1.0.jar
shapeless_2.13-2.3.3.jar
slf4j-api-2.0.6.jar
sqltool-2.6.1-jdk8.jar

Environment

  • Hadoop 3.2.4
  • Spark 3.4.3
  • OS: ALT Linux: "Linux 5.10.156-std-def-alt0.c9f.2 Build preparation #1 SMP Fri Nov 25 21:32:34 UTC 2022 x86_64 GNU/Linux"

ClickHouse Server

  • ClickHouse Server version: 24.8.8.17
  • CREATE TABLE sks_data.sks_last_event ON CLUSTER default_cluster ( document_id String, time_control_id String, knd Nullable(String)) ENGINE = MergeTree PARTITION BY cityHash64(document_id) % 100 ORDER BY document_id SETTINGS index_granularity = 8192

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions