java.lang.ClassCastException (Please)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shannen_Ang
Posted On:   Friday, August 10, 2001 02:59 AM

I understand that there has been a lot of history records for such query but mine is not because of casting to the implementation instead of the interface. My client code is as follows: ... java.rmi.registry.LocateRegistry.createRegistry(1100); String url = new String("rmi://localhost/dummyService"); dummy d = (dummy)Naming.lookup(url); ... My server code is: ... java.rmi.registry.LocateRegistry.createRegistry(1099); dummyImpl dImpl = new dummyImpl(); Naming.rebind("rmi://localhost:1099/dummyService",dImpl); ... Shannen    More>>

I understand that there has been a lot of history records for such query but mine is not because of casting to the implementation instead of the interface.
My client code is as follows:

...

java.rmi.registry.LocateRegistry.createRegistry(1100);
String url = new String("rmi://localhost/dummyService");

dummy d = (dummy)Naming.lookup(url);

...


My server code is:

...

java.rmi.registry.LocateRegistry.createRegistry(1099);

dummyImpl dImpl = new dummyImpl();

Naming.rebind("rmi://localhost:1099/dummyService",dImpl);

...


Shannen

   <<Less
About | Sitemap | Contact