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

0

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Make sure to compile the stub as 1.3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.