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

Support for postgresql 42.7.2 - java.lang.NoSuchFieldError: checkConnectionQuery #1321

Closed
vadimbakaev opened this issue Feb 21, 2024 · 6 comments

Comments

@vadimbakaev
Copy link

vadimbakaev commented Feb 21, 2024

It seems that checkConnectionQuery is no longer available from version 42.7.2

See the release notes: https://github.com/pgjdbc/pgjdbc/releases/tag/REL42.7.2

pgjdbc/pgjdbc#3101

It looks like it is used in this place:

java.lang.NoSuchFieldError: checkConnectionQuery
	at org.postgresql.jdbc.PgConnection.getCheckConnectionStatement(PgConnection.java)
	at kamon.instrumentation.jdbc.PgConnectionIsAliveAdvice$.enter(StatementInstrumentation.scala:199)
	at org.postgresql.jdbc.PgConnection.isValid(PgConnection.java:1520)
	at com.zaxxer.hikari.pool.PoolBase.checkValidationSupport(PoolBase.java:460)
	at com.zaxxer.hikari.pool.PoolBase.checkDriverSupport(PoolBase.java:443)
	at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:412)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:365)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:202)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:461)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:550)
	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:98)
	at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:80)
	...

Version 42.7.2 has security fixes and Kamon blocks the migration, could you take a look, please?

@Dichotomia
Copy link

Dichotomia commented Feb 22, 2024

We are facing the same problem here. The applications refuse to start with the new postgresql driver version.

@choffmeister
Copy link

choffmeister commented Feb 23, 2024

This is the workaround for us currently, so that we can update to the fixed pgsql.

# reference.conf
kanela.modules.jdbc.enabled = no

Ofc this means, that we currently have no instrumentation for jdbc, but at least fixed the vuln and all other kamon stuff still works.

@hughsimpson
Copy link
Contributor

Just ran into this myself. Will push out a fix

@hughsimpson
Copy link
Contributor

Fix merged. Will cut a release either later today or tomorrow

@hughsimpson
Copy link
Contributor

Will need @ivantopo in order to release because reasons. Will leave this issue open until it's successfully out

@hughsimpson
Copy link
Contributor

Resolved as of v2.7.1

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

4 participants