Why "java.rmi.ServerException: RemoteException occurred in server thread" shows?

StackOverflow https://stackoverflow.com/questions/21857968

  •  13-10-2022
  •  | 
  •  

Question

Why the following error is showing ?

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

Was it helpful?

Solution

If you look at the entire stack trace, which you should have posted in your question, you will probably find that the error occurred in bind() or rebind(). That indicates that the Registry doesn't have the class mentioned on its CLASSPATH.

Solution: either run the Regsistry with an appropriate CLASSPATH, or run it inside the server JVM via LocateRegistry.createRegistry().

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top