hamedh.1990
hamedh.1990

Reputation: 179

java.lang.ClassNotFoundException: java.rmi.server.RemoteObjectInvocationHandler in Java 1.3

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

Upvotes: 0

Views: 178

Answers (1)

user207421
user207421

Reputation: 310875

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.

Upvotes: 1

Related Questions