aspose file tools*
The moose likes Distributed Java and the fly likes RMI: Remote method cannot be called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI: Remote method cannot be called " Watch "RMI: Remote method cannot be called " New topic
Author

RMI: Remote method cannot be called

N. Vasilev
Greenhorn

Joined: Mar 23, 2010
Posts: 5
The problem is in the client class.
Getting the registry is OK, looking up the remote object is OK,
the connection is established for both srv and client, BUT when i try to call a remote method in the client interface it just not calling.
I mean no error is returned and the application is continuing to work.
In the interface which srv implements i have the following 2 methods:
interface class:
public List<Items> retrieveItems() throws RemoteException;
public void orderQty(String id, Item item, int qty) throws RemoteException;




here i am trying to call the method, first i get the value from the the text field and then parse and than call the remote method.
The deguger just passes by the line of the remoteServer and nothing happens. No method call and not even an error or sth else.
title, selected, desQty are correct. If they were not an error would appear.
ClientIml class:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
try {
int desQty = Integer.parseInt(jTextField1.getText());
remoteServer.orderQty(title, selected, desQty);
} catch (RemoteException ex) {
Logger.getLogger(ClientOrder.class.getName()).log(Level.SEVERE, null, ex);
}
}



The Problem is strange and i am writing because it seems to be an easy one, but unfortunately i cannot find the root causing the method not to work.

If you have any ideas please write. 10x
N. Vasilev
Greenhorn

Joined: Mar 23, 2010
Posts: 5
Also i tried to debug it in Eclipse and NetBeans hoping to get an error or sth else but it also didn't help.
It is passing by this line like it is not there ...
N. Vasilev
Greenhorn

Joined: Mar 23, 2010
Posts: 5
Solved!
 
jQuery in Action, 2nd edition
 
subject: RMI: Remote method cannot be called