This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "look up error" Watch "look up error" New topic

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