This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I get this error when try to cast my RMI object back to what I consider to be it's proper type
java.lang.ClassCastException: $Proxy0 cannot be cast to GumballMonitorRMIClient.RMIAdaptor It seems to me that I believe that the object is of type RMIAdaptorRemoteInterface with a concrete type of RMIAdaptor
but the computer thinks the object is of type $Proxy0, which is leading to a number of problems
So where did it go wrong?
I created the remote object like this
And now I want to access those methods remotely using this code
But when I try to cast it back to it's former type
the compilier argues with me about what type it reall is and gives me this error message
java.lang.ClassCastException: $Proxy0 cannot be cast to GumballMonitorRMIClient.RMIAdaptor