wood burning stoves 2.0
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
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI: Remote method cannot be called " Watch "RMI: Remote method cannot be called " New topic

RMI: Remote method cannot be called

N. Vasilev

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

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

Joined: Mar 23, 2010
Posts: 5
I agree. Here's the link: http://aspose.com/file-tools
subject: RMI: Remote method cannot be called
It's not a secret anymore!