Client fails to connect with RMI registry when using ProcessBuilder

Posted by xavier666 on Stack Overflow See other posts from Stack Overflow or by xavier666
Published on 2012-09-10T21:20:01Z Indexed on 2012/09/10 21:38 UTC
Read the original article Hit count: 358

Filed under:
|
|
|
|

If i'm creating the RMI registry from command line, the client has no problem in binding objects to the registry.

However, if i'm starting the RMI registry using ProcessBuilder, it's giving error.

This is my code for creating rmiregistry using ProcessBuilder

ProcessBuilder obj = new ProcessBuilder ("rmiregistry","2500");

Process obj_process = obj.start();

The error that i'm getting for using ProcessBuilder when I'm trying to bind to my own RMI registry

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
java.lang.ClassNotFoundException: node_func

node_func is an interface

Any ideas?

© Stack Overflow or respective owner

Related posts about java

Related posts about process