wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI Problem -- lost of remote object reference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI Problem -- lost of remote object reference" Watch "RMI Problem -- lost of remote object reference" New topic
Author

RMI Problem -- lost of remote object reference

MJ Tang
Greenhorn

Joined: Jun 13, 2002
Posts: 5
Hi
I am at the stage of figure out a working model of the project.
So far, my "Search" and "Book" function works well in local mode.
After I implemented RMI, the "Search" button stopped functioning although the initial "Search for all records" works fine in the RMI mode. (I have a initialize() method at the RMI client to fetch out all records from the existing database and have them displayed in the JTable.)
I added in a few debugging lines in the java source files and discovered that the remote object reference was lost after I specified the desired "Origin Airport","Destination Airport" and click on the "Search" button in RMI mode.
I got no output at the RMI Server after the click of either "Search" or "Book" button. and I got "NullPointer Exception" at the RMI Client.
Please kindly tell me what's wrong.
Thanks.
Linda
Hugo van Elk
Greenhorn

Joined: Jun 17, 2002
Posts: 15
Hi
Maybe using a debuger is a good idee? I used jdb and it helped me out several times.
Greetz,
/Hugo.
MJ Tang
Greenhorn

Joined: Jun 13, 2002
Posts: 5
Hi, Hugo
Thanks.
I have figured out what's wrong. My RMI mode is now working.
Linda
Ramesh kumaar
Ranch Hand

Joined: Mar 19, 2002
Posts: 146
Could u please explain the problem and how u solved
MJ Tang
Greenhorn

Joined: Jun 13, 2002
Posts: 5
Hi, Ramesh kumaar
I was imitating the RMI tutorial when I declared the remote object in my initialize () method and when I used the Naming.lookup method to look up the remote object by name in the local host's registry.
I was not aware of the fact that I had overwrite and declared the remote object as a local variable in the initialize () method although I had the same name remote object declared as class variable at the beginning of RMI client class.
Linda
 
Don't get me started about those stupid light bulbs.
 
subject: RMI Problem -- lost of remote object reference
 
Similar Threads
Passed SCJD - 354 /400
Locking and remoteException
passed with 146/155
NX: URLYBird / my approach of the reading problem
design comments ...