title: com.sun.proxy.$proxy0 cannot be cast to XXX
body: <p>I was writing a RMI application. I have a method on the server side, which returns an <code>ArrayList&lt;User&gt;</code> and <code>User</code> is a class I defined myself. The code is like: <code>list = obj.getList(); System.out.println(list.get(0).getName());</code>, and this line generated an exception of "com.sun.proxy.$Proxy0 cannot be cast to User". Can anybody help me about that?</p>