getappmap / appmap-java

AppMap client agent for Java
Other
80 stars 14 forks source link

method instrumentation fails when agent classes can't be loaded #222

Closed apotterri closed 11 months ago

apotterri commented 11 months ago

Depending on the structure of the application's class loader hierarchy, classes in the agent jar may not be available to the application. In particular, com.appland.appmap.process.ThreadLock and com.appland.appmap.process.ExitEarly can't be loaded, which causes a failure when javassist tries to compile an instrumented method.

kgilpin commented 11 months ago

This is wild. The agent can’t access its own code? Yikes.

apotterri commented 11 months ago

Well, sort of. It looks like the agent isn't configuring javassist correctly. In particular, it's using instances of ClassPool aren't able to find those classes.

brikelly commented 11 months ago

Fixed in 1.22.2