Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

AppMon 7.2 Java 11 java.lang.NoClassDefFoundError: java/sql/Connection



I'm using AppMon 7.2 (October 2018) to monitor my applications which are Spring Boot based Java apps.

Recently I updated my apps to use Java 11 and since then I've got problems with running my applications which use databeses (PostgreSQL). When I'm trying to run my applications with Dynatrace agent I get following error message at startup:

Caused by: java.lang.NoClassDefFoundError: java/sql/Connection
    at com.compuware.apm.agent.introspection.jdbc.ConnectionPoolIntrospection.updateConnectionClass(
    at org.postgresql.jdbc.PgConnection.prepareStatement(
    at org.postgresql.jdbc.PgConnection.isValid(
    at com.zaxxer.hikari.pool.PoolBase.checkValidationSupport(
    at com.zaxxer.hikari.pool.PoolBase.checkDriverSupport(
    at com.zaxxer.hikari.pool.PoolBase.setupConnection(
    at com.zaxxer.hikari.pool.PoolBase.newConnection(
    at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(
    at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(
    at com.zaxxer.hikari.pool.HikariPool.checkFailFast(
    at com.zaxxer.hikari.pool.HikariPool.<init>(
    at com.zaxxer.hikari.HikariDataSource.getConnection(
    at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(
    ... 138 common frames omitted

I tried to disable JDBC Sensor Pack from default Java system profile and them my app statrs just fine with agent, but ofcourse I'm not able to see any database related metrics.

I've also tried to set com.dynatrace.diagnostics.useReflectionForJDBC=true for connector as mentioned here But it didn't work.

Could someone help me wit this problem?

I would like to have databese monitoring in my apps since they are very database intense. Maybe there is another way to achive at least some functionality of JDBC sensor if it's not working with Java 11?

I've attached aget run log.



DynaMight Leader
DynaMight Leader

In general Java 11 should be normally supported by Appmon Agent which is made based on OneAgent. I think you should open support ticket for this particular case.


Regards, Sebastian

Hi Sebastian.

Thanks for your answer. Can you tell me how can I oppen such support ticket?



After help from support I've managed to fix this bug. I'm adding answer in case somebody else stumble across similar issue.

Firstly I needed to upgrade my AppMonn instalation to newest available. You can find upgrades here

Then I colud use newest oneagent to connect my applications (you can find it after upgrade in your DYNATRACE_HOME/server/agents directory)

I've also needed to change my -agentpath parameter since I was using outdated config. Change was as following:





Finally I added -Xshare:off java parameter to my application startup configuration. There was a warning in logs to do so since JVM I'm using automatically enabled class data sharing feature which is not compatible with AppMon.

And after this step my applications started with fully working dynatrace monitoring (including JDBC sensor)

I hope my answer will be helpfull for someone with similar problems.



Thanks for sharing! Side-note: by using the agent platform switch feature a reconfiguration of the agentpath would be unnecessary (see That is also the recommended approach.