Name
NoSuchObjectException
Where thrown
In the RMI infrastructure on the server side.
When thrown
As part of the standard distributed communication between client and server. This is thrown after the RMI infrastructure on the server has already demarshalled the arguments and is trying to actually call a method on your code.
Why thrown
Every remote method call contains an ObjID
, which
uniquely identifies the object on which the method call is being
made. The RMI infrastructure maintains a hashtable of instances of
ObjID
to RemoteServers
. This
error indicates that the ObjID
passed over the
wire was not a key in this table.
What it means
This usually occurs when a client has a stub to a server that no
longer is running in the server process. This is a strange exception
to encounter because stubs try to maintain leases on servers (which
usually prevents a server from being shut down). As such, this
exception usually indicates a failure in the distributed garbage
collector (it doesn’t indicate that the server
process crashed; if the server process crashed, an instance of
ConnectException
would have been thrown instead).
Get Java Enterprise Best Practices now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.