This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
Could u please explain the problem and how u solved
Joined: Jun 13, 2002
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