java.lang.ClassNotFoundException while binding an object
Hi, I've got a problem with an RMI server. I wrote this interface:
package it.andreisantoni.tesi.node;
publicinterface NodeInterfaceextends Remote
{
public AbstractPlugin getFirstPlugin()throws RemoteException;
}
then I used rmic to compile the stub and a Node_Stub.class had been created in /it/andreisantoni/tesi/, together with Node.class (that implements NodeInterface)
Then I tried exporting it and binding it (obviously after running rmiregistry):
....
node =new Node();
NodeInterface stub = (NodeInterface)UnicastRemoteObject.exportObject(node,0);
Naming.rebind("node", node);
....
But when I try to run the server I get these exceptions:
java.rmi.ServerException: RemoteException occurred in server thread; nested exce
ption is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: it.andreisantoni.tesi.node.Node_Stub
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:385
)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
60)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at it.andreisantoni.tesi.Main.main(Main.java:23)
Is there something I'm missing?
Thanks in advance

