Questions tagged [rmi]

Remote Method Invocation (RMI) is Java's object-oriented remote procedure call (RPC) mechanism.

Java's Remote Method Invocation (RMI) is the standard object-oriented RPC mechanism in all versions of Java. RMI is built upon the Java platform's object serialization mechanism, provides a simple naming service, and provides a distributed garbage collection (DGC) mechanism.

There are at least three RMI protocols: JRMP: Java Remote Method Protocol, built into the JDK; RMI/IIOP: Internet Inter-Orb Protocol, from CORBA, built into the JDK; and JERI: Java Extensible Remote Invocation, which was the subject of two rejected JSRs and eventually appeared in Jini 2.0, whose main purpose was to greatly improve several aspects of secure RMI. RMI/IIOP is the standard protocol for J2EE, although various J2EE vendors have their own protocols as well.

2607 questions
16
votes
4 answers

Java RMI and synchronized methods

I'm studying the book "Distributed Systems" (by Tanenbaum & Van Steen) and they say something that seems to conflict to what seems to be instead thought by many on Java RMI and synchronized methods. What I thought is that using a synchronized method…
Andrea Zilio
  • 4,444
  • 3
  • 29
  • 34
16
votes
1 answer

Exception "remote object implements illegal remote interface"?

I use rmi in Java. however there is a ExportException "remote object implements illegal remote interface". Here is my code, May someone help me? public interface RemotePeer extends Remote { public abstract void displayInf(String inf); …
user1487718
15
votes
4 answers

How do I set the classpath that rmiregistry uses?

I'm trying to make a Java RMI client/server app. I'm running into problems starting up the server side of my app, as it keeps running into a ClassNotFoundException during the call to the Registry.bind() method when I attempt to start up the server…
Adrian
  • 191
  • 1
  • 1
  • 8
15
votes
6 answers

Remote method invocation port in use

I have created a Server, Client kind of program with RMI. But whenever I run my Server after starting the rmiregistry from command prompt, the port already in use error is thrown. Its only me who started the rmiregistry. I have checked it from…
Andrews
  • 895
  • 3
  • 15
  • 30
15
votes
1 answer

InApp Billing Security and Remote Method Invocation

I've implemented in app billing in an app, and now I want to secure it a little more. Reading the developer material it states: In addition to running an obfuscation program, we recommend that you use the following techniques to obfuscate your…
Blundell
  • 75,855
  • 30
  • 208
  • 233
15
votes
5 answers

Rmi connection refused with localhost

I have a problem using java rmi: When I'm trying to run my server, I get a connectException (see below). Exception happens when executing the rebind method: Runtime.getRuntime().exec("rmiregistry 2020"); MyServer server = new…
Fortega
  • 19,463
  • 14
  • 75
  • 113
15
votes
5 answers

Java RMI Tutorial - AccessControlException: access denied (java.io.FilePermission

Yesterday I tried to get started with Java RMI. I found this sun tutorial (http://java.sun.com/docs/books/tutorial/rmi/index.html) and started with the server implemantation. But everytime I start the pogram (the rmiregistry is running) I get an…
user25913
  • 221
  • 1
  • 2
  • 5
14
votes
4 answers

RMI server: rmiregistry or LocateRegistry.createRegistry

For RMI on server-side, do we need to start rmiregistry program, or just call LocateRegistry.createRegistry? If both are possible, what are the advantages and disadvantages?
Randy Sugianto 'Yuku'
  • 71,383
  • 57
  • 178
  • 228
14
votes
2 answers

What's the alternative for Spring RMI? (since it's deprecated)

Spring seems to be deprecating its RMI: As of Spring Framework 5.3, support for several remoting technologies is now deprecated for security reasons and broader industry support. Supporting infrastructure will be removed from Spring Framework for…
Arturas M
  • 4,120
  • 18
  • 50
  • 80
14
votes
1 answer

Can't start RMI server after stopping it

I'm having a problem restarting my RMI registry after it has been stopped: import java.rmi.*; import java.rmi.registry.*; import java.rmi.server.UnicastRemoteObject; import javax.swing.JOptionPane; public class CinemaServer { private Registry…
sAaNu
  • 1,428
  • 7
  • 21
  • 46
14
votes
3 answers

error with JRMP connection establishment

I am getting following exception trace : java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: java.net.SocketTimeoutException: Read timed out at…
Sidd
  • 313
  • 2
  • 3
  • 10
13
votes
5 answers

java.rmi.ServerException: RemoteException occurred in server thread (ClassNotFoundException)

The following method: private void startServer() { // snippet that starts the server on the local machine try { RemoteMethodImpl impl = new RemoteMethodImpl(); Naming.rebind( "Illusive-Server" , impl ); …
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
13
votes
8 answers

Is it possible to use RMI bidirectional between two classes?

I want to share some information between two classes (A and B), which are running in different java programs. Instead of writing a whole communication protocol I want to use the java build-in rmi classes for that purpose. Currently class B is able…
Markus
  • 457
  • 1
  • 10
  • 20
13
votes
5 answers

RemoteException java.rmi.UnmarshalException: error unmarshalling return

I'm running the program here on 2 JVMs on diff physical machines. I get the error RemoteException java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: CalculatorImpl_Stub (no…
P R
  • 1,293
  • 7
  • 28
  • 58
13
votes
4 answers

java.net.ConnectException :connection timed out: connect?

I have used RMI in my code : import java.rmi.*; public interface AddServerIntf extends Remote { double add(double d1,double d2) throws RemoteException; } import java.rmi.*; import java.rmi.server.*; public class AddServerImpl extends…
saplingPro
  • 20,769
  • 53
  • 137
  • 195