java.rmi.NoSuchObjectException: no such object in table

Robert DiFalco <[email protected]>
Newsgroups gmane.comp.java.sun.rmi
Message-ID <[email protected]>
If I have a server stub and I bind that stub to a local Registry, is
that enough to keep it from being cleaned up by DGC?

I seem to be getting the above exception from a client (on a heavily
loaded and scaled system) and I'm not quite sure why. My server simply
extends AbstractRemoteObject then in the ctor does something basically
like this:

        LocateRegistry.getRegistry( getLocalServicePort() ).rebind(
            UnicastRemoteObject.toStub( this ) );

With ~1,000 servers, the client can get this stub and invoke methods on
it with no problem. Looking at the server (i.e. agent) logs, all have
been initialized and idle for at least an hour. Every once in a while we
will see something like this:

 Caused by: java.rmi.NoSuchObjectException: no such object in table
        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRem
oteCall.java:247)
        at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223
)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
        at
com.tripwire.space.services.station.StationService_Stub.exec(Unknown
Source)
        at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
com.xxx.common.rpc.ProxyInvocationHandler.invokeMethod(ProxyInvocationHa
ndler.java:86)
        at
com.xxx.common.rpc.ProxyInvocationHandler.invokeMethod(ProxyInvocationHa
ndler.java:113)
        at
com.xxx.common.rpc.ProxyInvocationHandler.invoke(ProxyInvocationHandler.
java:42)
        at $Proxy0.exec(Unknown Source)
        at
com.xxx.services.rule.RuleManagerService$Launcher.run(RuleManagerService
.java:328)
        ... 2 more

The ProxyInvocationHandler is not very interesting. It's just an
InvocationHandler that if invoke fails on a cached stub, it will just
look the object up again (get a fresh copy) and retry the call. And like
I said, this all works fine 99.9% of the time. In this case we are
testing scaling up the agents (i.e. servers) by putting them in VM's
across a few machines. But I don't think that is relevant either. We are
using Windows Sun JRE 1.4.2_08.

Something else, in the properties for both the server and the client, I
set the DGC lease/etc values very large, so I'm having a hard time
figuring this out.

        sun.rmi.dgc.server.gcInterval=3600000
        sun.rmi.dgc.client.gcInterval=3600000
        sun.rmi.dgc.checkInterval=1800000

R.

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html

To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.