Skip to content
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

Kamon-jdbc incompatible with AWS advanced JDBC wrapper #1377

Open
mgralle opened this issue Dec 16, 2024 · 1 comment
Open

Kamon-jdbc incompatible with AWS advanced JDBC wrapper #1377

mgralle opened this issue Dec 16, 2024 · 1 comment

Comments

@mgralle
Copy link

mgralle commented Dec 16, 2024

Our project has been using kamon and iam-jdbc for postgresql without problems for a long time, but as iam-jdbc uses AWS-SDK v.1, we would like to migrate to the AWS advanced JDBC wrapper. Initializing the HikariPool fails with the following exception:

java.lang.ClassCastException: class software.amazon.jdbc.wrapper.ConnectionWrapper cannot be cast to class kamon.instrumentation.jdbc.HasConnectionPoolTelemetry (software.amazon.jdbc.wrapper.ConnectionWrapper and kamon.instrumentation.jdbc.HasConnectionPoolTelemetry are in unnamed module of loader 'app')
at kamon.instrumentation.jdbc.PoolBaseNewConnectionAdvice$.enter(HikariInstrumentation.scala:221)
at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:406)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:374)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:541)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)

The only enabled AWS wrapper plugin is "iam".
Versions:

"org.postgresql"        % "postgresql"                % "42.6.1"
"software.amazon.jdbc"  % "aws-advanced-jdbc-wrapper" % "2.5.3"
"org.tpolecat"         %% "doobie-hikari"             % "1.0.0-RC2"
"org.scalikejdbc"      %% "scalikejdbc"               % "4.0.0"
"io.kamon"             %% "kamon-bundle"              % "2.7.3"
"io.kamon"              % "kanela-agent"              % "1.0.18"
"com.typesafe.akka"    %% "akka-actor-typed"          % "2.6.21"
"com.lightbend.akka"   %% "akka-persistence-jdbc"     % "5.1.0"
@Iilun
Copy link

Iilun commented Dec 23, 2024

I encounter the exact same stack when trying to use DuckDB JDBC driver. I have setup a repo for reproduction

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

No branches or pull requests

2 participants