java.lang.IncompatibleClassChangeError: Implementing class
843793Oct 6 2001 — edited Oct 10 2001hi,
i am getting a problem in bind.the code is executing till
Registry reg = LocateRegistry.getRegistry(1098);
System.out.println("Connected to existing registry.");
CurrentRateImpl crt = new CurrentRateImpl();
System.out.println("11.");
but as soon as i am reaching this statement
reg.bind("CurrentRateImpl1", crt);
i am getting an error, which reads like this
**************
Exception in thread "main" java.rmi.ServerError: Error occurred in server thread
; nested exception is:
java.lang.IncompatibleClassChangeError: Implementing class
java.lang.IncompatibleClassChangeError: Implementing class
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.java:249)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
224)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:358)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at CurrentRateImpl.main(CurrentRateImpl.java:26)
***************
//This is the remote class.
import java.net.*;
import java.rmi.*;
import java.io.*;
import java.rmi.server.*;
import java.rmi.registry.*;
public class CurrentRateImpl
extends UnicastRemoteObject
implements CurrentRate{
public CurrentRateImpl() throws RemoteException{
super();
}
public static void main(String[] args) throws Exception {
System.setSecurityManager(new RMISecurityManager());
Registry reg = LocateRegistry.getRegistry(1098);
System.out.println("Connected to existing registry.");
CurrentRateImpl crt = new CurrentRateImpl();
System.out.println("11.");
reg.bind("CurrentRateImpl1", crt);
System.out.println("12.");
System.out.println("Use the current interest rate");
}
public long getCurrentRate()
throws RemoteException{
return 10l;
}
}
************
please help...