Classloader Confusion #1822
Replies: 2 comments 1 reply
-
The problem is probably that you are calling Rather add a string of the package and name, and make sure that the Datastax classes are never mentioned in your agent otherwise. You should also move:
to a different class. Those classes must be available to your app loaders, so likely they need to be on the boot loader. The |
Beta Was this translation helpful? Give feedback.
-
The advice code is inlined into the targeted class, so the Datastax classes should already be available there. You do of course need to include them during compilation, but at runtime, they should be provided. This way, you should interact with the targeted classes in your advice and then extract a description that you can safely pass ti your agents in the format of built-in types that any class loader understands. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm trying to instrument part of the Datastax Cassadra CQL Driver, and I'm running into what looks like a ClassLoader issue. As I've seen in many similar issues, I'm running a Spring app and it works fine locally when I run it with
--javaagent
, but throws an error at runtime once deployed. I am trying to avoid shading in the entirety of the Cassandra Driver as this agent's size needs to remain as small as possible.Agent:
Advice Class:
Runtime Error:
Pom:
I've been tinkering with including different classloaders in the advice but nothing seems to be getting me any closer to having access to that class. I believe this is something simple but I'm just missing the right way to go about it. Thanks for any and all help in advance!
Beta Was this translation helpful? Give feedback.
All reactions