• No replies
1 Post

Pinned topic Javassist Classpath Question

‏2009-12-17T19:35:56Z |

I am trying to instrument a class file test.TestClass contained within a WAR file. My instrumentation code resides in a seperate jar file referred to by the -javaagent command line argument. However when I run the server, I am getting the following error.

13:23:32,431 ERROR STDERR javassist.CannotCompileException: cannot find test.TestClass1

where TestClass1 is a class that is imported by the class that I am trying to instrument, and it is in the same WAR file. It seems that it cannot find this class during run time, however if I include this class file in the jar file containing my instrumented code, it successfully instruments my class.

Is there a better way to have this class resolved than manually including it in my instrumentation jar.