File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

look up error

 
Val Dra
Ranch Hand
Posts: 439
  • 0
  • Mark post as helpful
  • send pies
  • 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");
 
Luna Bora
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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");
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic