I have completed the assignment using Sockets. wanted to try RMI
I have a peculiar problem ==
The Client works fine the first time it is connected, but if I exit and then try to connect again it gives an exception which is :
Remote object = RMIServerDBAdapter_Stub[RemoteStub [ref: [endpoint:[127.0.0.1:10
80](remote),objID:[3ac748:e8735f5dd2:-8000, 0]]]]
in populate combobox
in populate combobox ::: no. of records = 24
Caught Exceptionnull
java.lang.NullPointerException
at Sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at RMIServerDBAdapter_Stub.getRecord(Unknown Source)
at RMIClientDBAdapter.getRecord(RMIClientDBAdapter.java:157)
at ComboPanel.populateComboBoxOfPort(ComboPanel.java:77)
at ComboPanel.makeInputPanel(ComboPanel.java:29)
at ComboPanel.<init>(ComboPanel.java:137)
at ClientFrame.<init>(ClientFrame.java:66)
at Client.main(Client.java:56)
in populate combobox == return airport = null
EXCEPTION In initializing client.
java.lang.NullPointerException
at javax.swing.DefaultComboBoxModel.<init>(Unknown Source)
at javax.swing.JComboBox.<init>(Unknown Source)
at ComboPanel.makeInputPanel(ComboPanel.java:29)
at ComboPanel.<init>(ComboPanel.java:137)
at ClientFrame.<init>(ClientFrame.java:66)
at Client.main(Client.java:56)
WHAT COULD THE PROBLEM BE?
WHEN I RESTART THE SERVER, EVERYTHING IS FINE.
I am creating registry via server code.
Where shd i start looking for problem?? Testing on one machine.
Pls comment
Thanx
Shailendra