我有运行jvm 1.5的现有rmi服务器和运行jvm 1.6的客户端通信没有问题。
但是,当我运行(服务器下JVM1.7/client jvm1.7)或(服务器下JVM1.7/client jvm 1.6)得到以下错误-
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.EOFException
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.EOFException
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.tmobile.kiosk.simulator.Kiosk.<init>(Unknown Source)
at com.tmobile.kiosk.simulator.Kiosk.main(Unknown Source)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(Unknown Source)
(Server jvm 1.5/client jvm 1.7)收到以下错误-
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: com.xxx.yyy.zzzserver.ZZZServerFactoryImpl_Stub (no security manager: RMI class loader disabled)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
这是由于跨Java版本的RMI更改而发生的吗?
我可以在JVM1.7中运行rmi Server而不更改任何代码,以便现有客户端(jvm 1.5等)可以连接到它。
我们不会重建可能使用java1.4或1.5构建的jar文件。
提前感谢
问题是一些旧的jar版本是类路径的一部分。