• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

ClassCastException

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i am fighting with ClassCastException .Seems like i completed all the neccessary steps to obtain a remote object. Here is my code
OBJECT BOUNDED WITH REGISTRY:-
String url = "//localhost/Newtester";
RemoteDataInterface remoteObject = new DataRequestServer();
Naming.rebind( url, remoteObject);

LOOKING UP THE REMOTE OBJECT:-
String url = "//Newtester";
Object ob = Naming.lookup(url);
remoteObject = (RemoteDataInterface)ob;

I can not cast ob to RemoteDataInterface
is there help
kanwal
 
harcharan kanwal
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx guys
i was binding and finding two different names on the registry
 
You guys haven't done this much, have ya? I suggest you study this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic