RPC.stopProxy includes the following lines in case of error:
LOG.error("Could not get invocation handler " + invocationHandler +
" for proxy " + proxy + ", or invocation handler is not closeable.");
Trouble is, the proxy object is usually backed by WritableRpcEngine, which will fail in the event toString is called on one of its proxy objects. See HADOOP-7694 for more details on that issue. Until that's addressed, we might as well change the log message in RPC.stopProxy to not call toString() on proxy.