java.lang.ClassCastException: $Proxy0
java.lang.ClassCastException: $Proxy1
java.lang.ClassCastException: $Proxy2
java.lang.ClassCastException: $Proxy3
java.lang.ClassCastException: $Proxy4
java.lang.ClassCastException: $Proxy5
java.lang.ClassCastException: $Proxy6
java.lang.ClassCastException: $Proxy7
java.lang.ClassCastException: $Proxy8
java.lang.ClassCastException: $Proxy9
java.lang.ClassCastException: $Proxy10
java.lang.ClassCastException: $Proxy11
java.lang.ClassCastException: $Proxy12
java.lang.ClassCastException: $Proxy13
java.lang.ClassCastException: $Proxy14
The problem is that the interface that you created needs to extend java.rmi.Remote.