Hello everyone,
I am getting NPE, and surprisingly I can't figure out why ... I am calling a method from a client using java rmi. The method on the server side is as follows :
public List<String> getPrinters() throws RemoteException {
List<String> listPrinters= new ArrayList<String>();
for(int i=0; i<printers.size();i++){
listPrinters.add(printers.get(i).getName());
}
return listPrinters;
}
and then from the client side I am trying toSystem.out.println(rmiServer.getPrinters().size());
The connection is successful etc because i am sending some strings and replying back after so its all fine, gives me NPE on the client side while trying to print the size of the list that the method should return
Ideas? =)