Get your CodeRanch badge!*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes look up error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "look up error" Watch "look up error" New topic
Author

look up error

Val Dra
Ranch Hand

Joined: Jan 26, 2001
Posts: 439
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");

Val SCJP <BR>going for SCJD
Luna Bora
Ranch Hand

Joined: Jul 02, 2001
Posts: 34
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

Joined: Jan 26, 2001
Posts: 439
no i think i had it right before using LocateRegistry class and starting rmiregistry using dos it all worked fine.
Val Dra
Ranch Hand

Joined: Jan 26, 2001
Posts: 439
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
 
subject: look up error
 
Similar Threads
generics 1.4
how to start server in command line...
RMI client server don't work on ipv6 machines
can't solve the problem on RMI client code
error: "java.rmi.NotBoundException: Server" ???