Closed forchid closed 5 years ago
There is a bug in RpcClient proxy which is already fixed in our internal repository. I'll sync the repo soon.
At the same time RpcClient's built-in InvocationHandler is just a proof-of-concept implementation. It is supposed that applications will use their own handlers with application-specific error handling, balancing, routing, etc.
I've committed some RpcClient fixes. But generally UndeclaredThrowableException
is not a problem of RpcClient. Any remote method can fail with I/O exception. If the interface does not declare it in throws
, the exception will be wrapped in UndeclaredThrowableException
.
When I use RpcClient proxy service as a spring bean in spring boot, the java.lang.reflect.UndeclaredThrowableException is thrown in application bootstrap. A demo stack trace:
The demo likes this: