• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

look up error

 
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am in the final stage of submiting assignment
i wanted to create a registry and it worked but when trying to connect to a server now i am getting an error NotBoundException
here is what i do on a server
Registry r = LocateRegistry.createRegistry(new Integer(args[1]).intValue());
r.rebind("rmi://" + args[0] + ":" + new Integer(args[1]).intValue() + "//FBN",obj);
and code that should get remote reference is
obj = (DataImpl)Naming.lookup("rmi://"+address+":" + port + "//FBN");
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
r.rebind("rmi://" + args[0] + ":" + new Integer(args[1]).intValue() + "//FBN",obj);
This should be written as
r.rebind("FBN",obj);
 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no i think i had it right before using LocateRegistry class and starting rmiregistry using dos it all worked fine.
 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i got it working now here is what i did
Registry registry = LocateRegistry.getRegistry(port);
obj = (DataImpl)registry.lookup("rmi://" + address + ":" + port + "//FBN");
 
reply
    Bookmark Topic Watch Topic
  • New Topic