Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why am I getting a NoSuchObjectException (or similar RMI exception)?

exception RMI similar
0
Posted

Why am I getting a NoSuchObjectException (or similar RMI exception)?

0

This most likely means that the RemoteStream client is trying to use a reference to a RemoteStreamServer which has not been serialized (in other words, the client is trying to use a local handle to the server). RMI uses a distributed garbage-collection (DGC) strategy to keep server references alive while clients have RemoteStub instances that reference them. If the RemoteStub is not been serialized/deserialized before usage, it does not trigger the DGC code, so the server instance gets cleaned up soon after creation. Basically, you should never use a RemoteStreamServer reference locally (you should just use a regular Input/OutputStream in this case). For more information, see the EJB section of the Usage Notes.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123