I am writing a very simple RMI server, and I am seeing intermittent java.rmi.NoSuchObjectExceptions in the unit tests.
I have a string of remote method
While using spring remoting (rmi) i bumped into this error. My service wasn't garbage collected.
After turning on debug logging for "org.springframework" i discovered that my server was registering the service on the default port (1099) instead of the port the client was trying to connect to.
I thought everything port wise was ok cause "java.rmi.server.logCalls=true" did show some output on server when client was trying to connect.
When getting this error double check the ports (the service and registry one).