i wrote simple java agent instrument activity in java based web applications using javassist library.
the problem when attach agent jp2launcher process i'm getting classnotfoundexception thrown because cannot find javassist.ctbehavior class.
so tried running simple local java application test agent see if works , did.
i tried running test print "hello" java console , attach agent web application, , did work tells me agent works.
do of have idea why cannot find javassist when attached web application? set classpath point javassist.jar on disk.
thanks
you using default classpool
. javassist represents unloaded classes parsing class file each such class class loader. default class pool reference system class loader. web application executed different, application class loader. therefore, need append class loader classpool
being able use way observed in unit test.
Comments
Post a Comment