cim
cim copied to clipboard
cim-client启动异常,ProxyManager $Proxy66.toString() error
- RouteRequestImpl.getCIMServer()
- RouteApi routeApi = new ProxyManager<>(RouteApi.class, routeUrl, okHttpClient).getInstance();
- 动态代理调用接口时抛出一下异常
【异常】Method threw 'java.lang.reflect.UndeclaredThrowableException' exception. Cannot evaluate com.sun.proxy.$Proxy66.toString()
【求问】这种情况要如何解决啊。
能提供上下文吗..比如项目中用到RouteRequestImpl.getCIMServer()的代码。
因为ProxyManager中使用JDK动态代理,其invoke方法中是通过反射方法对Model进行的取值处理,故调用的接口方法入参可以改成model就不会出现这种错误了。。。
- RouteRequestImpl.getCIMServer()
- RouteApi routeApi = new ProxyManager<>(RouteApi.class, routeUrl, okHttpClient).getInstance();
- 动态代理调用接口时抛出一下异常
【异常】Method threw 'java.lang.reflect.UndeclaredThrowableException' exception. Cannot evaluate com.sun.proxy.$Proxy66.toString()
【求问】这种情况要如何解决啊。
同上面的回答,可以尝试一下