Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cim-client启动异常,ProxyManager $Proxy66.toString() error #119

Open
hensli opened this issue Apr 20, 2021 · 3 comments
Open

cim-client启动异常,ProxyManager $Proxy66.toString() error #119

hensli opened this issue Apr 20, 2021 · 3 comments

Comments

@hensli
Copy link

hensli commented Apr 20, 2021

  1. RouteRequestImpl.getCIMServer()
  2. RouteApi routeApi = new ProxyManager<>(RouteApi.class, routeUrl, okHttpClient).getInstance();
  3. 动态代理调用接口时抛出一下异常

【异常】Method threw 'java.lang.reflect.UndeclaredThrowableException' exception. Cannot evaluate com.sun.proxy.$Proxy66.toString()

【求问】这种情况要如何解决啊。

@xilou31
Copy link

xilou31 commented May 25, 2021

能提供上下文吗..比如项目中用到RouteRequestImpl.getCIMServer()的代码。

@bdw9005
Copy link

bdw9005 commented Jul 5, 2021

因为ProxyManager中使用JDK动态代理,其invoke方法中是通过反射方法对Model进行的取值处理,故调用的接口方法入参可以改成model就不会出现这种错误了。。。

@bdw9005
Copy link

bdw9005 commented Jul 5, 2021

  1. RouteRequestImpl.getCIMServer()
  2. RouteApi routeApi = new ProxyManager<>(RouteApi.class, routeUrl, okHttpClient).getInstance();
  3. 动态代理调用接口时抛出一下异常

【异常】Method threw 'java.lang.reflect.UndeclaredThrowableException' exception. Cannot evaluate com.sun.proxy.$Proxy66.toString()

【求问】这种情况要如何解决啊。

同上面的回答,可以尝试一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants