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
... 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 https://answers.dynatrace.com/questions/189215/getting-javalangnoclassdeffounderror-comdynatraced.ht... 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.
Solved! Go to Solution.
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 https://downloads.dynatrace.com/downloads/download.aspx?p=DT
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 https://www.dynatrace.com/support/doc/appmon/installation/set-up-agents/appmon-agent-configuration/a...). That is also the recommended approach.