Search code examples
javarmidistributed

RMI Activatable error with client


I've followed following tutorial to make my RMI stuff Activatable http://docs.oracle.com/javase/1.4.2/docs/guide/rmi/activation/activation.2.html

So i start the registry, run the rmid, and run the server. This all goes just fine.

When i try to connect the Client i get the following Exception:

java.rmi.activation.ActivateFailedException: activation failed; nested exception is: 
java.rmi.activation.ActivationException: unable to activate object; nested exception is: 
java.lang.ClassNotFoundException: server.Service
at sun.rmi.server.ActivatableRef.activate(ActivatableRef.java:285)
at sun.rmi.server.ActivatableRef.invoke(ActivatableRef.java:114)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
at $Proxy0.register(Unknown Source)
at client.BasicClient.<init>(BasicClient.java:27)
at client.NormalClient.<init>(NormalClient.java:11)
at client.ShippingClient.main(ShippingClient.java:24)

the webserver i run also contains the bin folder of my Server project.

I would also like to point out that, when everything was UnicastRemoteObject based, it all worked (and still does work) fine !

Thanks in advance


Solution

  • java.lang.ClassNotFoundException: server.Service
    

    There's your answer right there. The client, or possibly rmid, can't find that class.