-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
The retransformClasses() methods in Agent and AgentController use Class.forName() to try to get the class objects of classes needed to retransform. This obviously doesn't work for classes loaded by classloaders different from the one which loads the agent.
Those classes would be instrumented if they were loaded after their event probes were defined the AgentController. But when loaded earlier they would not be instrumented.
The fix is to iterate over all loaded classes via Instrumentation.getAllLoadedClasses() and check if a class matches an event probe definition.