• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI: Remote method cannot be called

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solved!
 
reply
    Bookmark Topic Watch Topic
  • New Topic