Skip to content

Conversation

@mzitnik
Copy link
Contributor

@mzitnik mzitnik commented Apr 9, 2025

Summary

Added simple test.
I have run it from an external app that imports the dependency.

<dependency>
      <groupId>com.clickhouse</groupId>
      <artifactId>clickhouse-jdbc</artifactId>
      <version>0.8.2</version>
      <classifier>shaded-all</classifier>
</dependency>

It works

Adding as a fallback to load from a class's class loader (for example, in DbVisualizer)

Screenshot 2025-04-10 at 11 38 40

Closes #2245

Checklist

Delete items not relevant to your PR:

mzitnik added 2 commits April 9, 2025 11:32
…t classloader for those cases when the thread is running in a different classloader
@mzitnik mzitnik marked this pull request as ready for review April 10, 2025 08:46
@mzitnik mzitnik requested review from Paultagoras and chernser April 10, 2025 08:47
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

}
} catch (Exception e) {
// ignore
try(InputStream in = ClickHouseClientOption.class.getClassLoader().getResourceAsStream(resourceFilePath)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the exception?
Should we use this way in default branch?

@mzitnik mzitnik merged commit 19946ce into main Apr 10, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Clickhouse JDBC driver doesn't report driver version

3 participants