I am trying to get a simple rmi program working, just the echo program which (I believe) was originally from Sun's tutorial page, though I can't find it now. I javac'ed and rmic'ed everything to get the classes (in package Echo) EchoClient, EchoServer, EchoServerImpl, EchoServerImpl_Skel, EchoServerImpl_Stub. I run
rmiregistry 5000 &
java -Djava.security.policy=java.policy -cp . Echo.EchoServerImpl localhost 5000 &
and I get the exception:
EchoServerImpl err: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Echo.EchoServerImpl_Stub
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Echo.EchoServerImpl_Stub
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Echo.EchoServerImpl_Stub
java.lang.ClassNotFoundException: Echo.EchoServerImpl_Stub
at sun.rmi.transport.StreamRemoteCall.exceptionReceiv edFromServer(StreamRemoteCall.java:245)
at sun.rmi.transport.StreamRemoteCall.executeCall(Str eamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:3 54)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at Echo.EchoServerImpl.main(EchoServerImpl.java:51)
I'm not sure what's happening here. The class Echo/EchoServerImpl_Stub.class is there so it should be able to find it, right?