[英]Javassist java.lang.NoClassDefFoundError
I want to instrument a library method to call one of my Class present in javassist agent. 我想检测一种库方法来调用javassist代理中存在的我的类之一。
Lets say I have a class: 可以说我有一堂课:
Class A {
void display() {
System.out.println("Inside A.dipslay()");
}
}
then when I invoke: 然后当我调用:
method.insertAfter("packageName.A.display()");
it throws the exception: 它引发异常:
Exception in thread "main" java.lang.NoClassDefFoundError: packageName/A
at java.net.HttpURLConnection.setRequestMethod(libraryClass)
at sun.net.www.protocol.http.HttpURLConnection.setRequestMethod(libraryClass)
at com.avekshaa.app.SecurityFilter.sendGet(Class where i call the Library Class)
at com.avekshaa.app.SecurityFilter.main(Class where i call the Library Class)
And when I call it just by name: 当我仅用名字来称呼它时:
method.insertAfter("A.display()");
then it gives a No such class found Exception. 然后它给出一个No such class found Exception。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.