问题:Caused by: net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
描述:很奇怪我用的是FastClass,当项目刚启动的时候,第一次调用会抛出这个异常,但是以后的都正常调用了,很奇怪,我用jdk反射就不会出现这个问题。
代码:
cglib:
@SuppressWarnings("unchecked")
protected <T> T execute(String method, Object service,Object paramter,T retrunType) throws Exception {
FastMethod serviceFastMethod = getDeclaredMethod(method,service,new Class[]{paramter.getClass()});
return (T) serviceFastMethod.invoke(service, new Object[]{paramter});
}
public FastMethod getDeclaredMethod(String method,Object object, Class<?> ... parameterTypes){
FastMethod serviceFastMethod = null;
for(Class<?> clazz = object.g