0

I need to run an rmi server on java 8 and call it from java 1.3; when i use This code:

ITest service= (Test) Naming.lookup("rmi://172.16.1.24:1009/testRmiService");
String people = service.TestMethod("hamed" );

"java.lang.ClassNotFoundException: java.rmi.server.RemoteObjectInvocationHandler"

occurred. After that I add this to java.policy:

permission java.net.SocketPermission "localhost:1009","connect, resolve";

this error will be shown :

java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: java.rmi.server.RemoteObjectInvocationHandler

Please help me to call my rmi service (on java 8 ) from java 3

user207421
  • 289,834
  • 37
  • 266
  • 440
hamedh.1990
  • 179
  • 2
  • 13

1 Answers1

1

You haven't run rmic on your remote objects, so you are getting dynamic stubs, and 1.3 doesn't understand those.

After that I add this to java.policy:

Pointless. You aren't running a security manager, so policy file entries are not used.

user207421
  • 289,834
  • 37
  • 266
  • 440