.
Ho dei problemi all'avvio del mio server RMI, in particolare:
codice:public class Server { public static void main(String[] args) { try { System.out.println("Inizio"); ArchivioBancoPosta A= new ArchivioBancoPosta(); System.out.println("Ok1"); Naming.rebind("ArchivioBancoPosta",A); System.out.println("Ok2"); } catch (RemoteException rexc) { System.out.println("EccRemota"); System.out.println(rexc.toString()); return; } catch (MalformedURLException muexc) { System.out.println("EccMalformed"); return; } } }
Riporto le eccezioni generate all'esecuzione:
codice:Inizio Ok1 EccRemota java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: ArchivioBancoPosta_Stub
Ovviamente ho gia creato lo Stub e l'ho messo nella stessa cartella dove ci sono tutti gli altri file .class compilati.
La classe ArchivioBancoPosta estende UnicastRemoteObject ed implementa Serializable ed ArchivioRemoto(cioè l'interfaccia Remote). Dove puo essere il problema??
.