远程调用时,只对接口操作。你的Serializable接口,序列化之后就可以操作了。

解决方案 »

  1.   

    public class InvalidClassException
    extends ObjectStreamException
    Thrown when the Serialization runtime detects one of the following problems with a Class. The serial version of the class does not match that of the class descriptor read from the stream 
    The class contains unknown datatypes 
    The class does not have an accessible no-arg constructor 
      

  2.   

    应该是这样吧:
    public class UserInfo implements Remote编译后用rmic UserInfo才能被远程调用
      

  3.   

    可以实现Remote远程接口,但是必须服务器端有UserInfo的定义
      

  4.   

    rmi传送的对象一定要实现Serializable,其实就是implements java.io.Serializable就可以了还有就是改了这个类,要编译remoteimpl,重新生成_stub文件否则client,server会不一致,会出UnmarshalException,
      

  5.   

    用rmi还有的一个问题就是,用了SecruityManager,运行的时候要在java后加你的policy文件对于policy,jdk下面有工具,jre也有一个默认的