Replies: 2 comments 3 replies
-
The problem might be caused by the fact that you are matching some spring bootstrap classes and they are loaded by a specific classloader which might not be affected by the As I mentioned previously I am considering some improvements this area since the current implementation more it less requires any class referenced from the probe handler method to be loaded by the bootstrap classloader as the class filter can match even various JDK methods which themselves are loaded by the bootstrap classloader. |
Beta Was this translation helpful? Give feedback.
-
This solved my issue thank you |
Beta Was this translation helpful? Give feedback.
-
I'm trying to run Btrace agent with log4j as an external library. I essentially need to use the MDC implementation in log4j to print out some of the contextual data from MDC in the btrace output.
It's been mentioned here #544 (comment) and here #85 (comment) that btrace in trusted mode can use external libraries as well. However, i found no actual examples or instructions anywhere of using external libraries with Btrace
If I have the following Btrace script
This script is successfully compiled by running
btracec -cp '.:log4j-1.2.17.jar' TrustedBTrace.java
However, trying to run this script with the btrace-agent with this command
fails with the error message
Although the stack trace is a little funny, in that it includes classes from my application instead of btrace, at it's core the problem seems to be that the class loader cannot find log4j class, even though it's been included in the class path when running the jar
How do i run the btrace agent so that it can load external jars at run time
Beta Was this translation helpful? Give feedback.
All reactions