• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI Problem -- lost of remote object reference

 
MJ Tang
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Maybe using a debuger is a good idee? I used jdb and it helped me out several times.
Greetz,
/Hugo.
 
MJ Tang
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Hugo
Thanks.
I have figured out what's wrong. My RMI mode is now working.
Linda
 
Ramesh kumaar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could u please explain the problem and how u solved
 
MJ Tang
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic