Posted By:
Ben_Pryor
Posted On:
Thursday, January 20, 2005 07:27 AM
I'm running into an interesting problem with a pretty vanilla RMI application. The server exports a single remote object using Naming.rebind(), and multiple clients invoke server methods remotely. There are no callbacks involved. The system normally works fine, but intermittently stops working and clients receive a "java.rmi.NoSuchObjectException: no such object in table" when making a remote call. It's interesting because the client's Naming.lookup() succeeds and returns a stub object, but when the client invokes a method on the stub object then the error occurs. Once the server has gotten into this state, it needs to be restarted manually, at which point it works fine again for a while. I turned o
More>>
I'm running into an interesting problem with a pretty vanilla RMI application. The server exports a single remote object using Naming.rebind(), and multiple clients invoke server methods remotely. There are no callbacks involved.
The system normally works fine, but intermittently stops working and clients receive a "java.rmi.NoSuchObjectException: no such object in table" when making a remote call. It's interesting because the client's Naming.lookup() succeeds and returns a stub object, but when the client invokes a method on the stub object then the error occurs. Once the server has gotten into this state, it needs to be restarted manually, at which point it works fine again for a while.
I turned on java.rmi.server.logCalls to try to see what's going on. Here's the important snip from the log that shows the problem:
Jan 19, 2005 4:39:52 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(6)-192.168.232.21: [192.168.232.21: sun.rmi.registry.RegistryImpl[0:0:0, 0]: java.rmi.Remote lookup(java.lang.String)]
Jan 19, 2005 4:39:52 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(7)-192.168.232.21: [192.168.232.21: sun.rmi.transport.DGCImpl[0:0:0, 2]: java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)]
Jan 19, 2005 4:39:52 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(7)-192.168.232.21: [192.168.232.21: com.mycompany.myserver.myserver[0]: public abstract java.lang.String com.mycompany.myserver.client.Imyserver.ping() throws java.rmi.RemoteException]
Jan 19, 2005 4:39:55 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(8)-192.168.232.21: [192.168.232.21: sun.rmi.transport.DGCImpl[0:0:0, 2]: void clean(java.rmi.server.ObjID[], long, java.rmi.dgc.VMID, boolean)]
Jan 19, 2005 4:51:20 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(9)-192.168.232.21: [192.168.232.21: sun.rmi.registry.RegistryImpl[0:0:0, 0]: java.rmi.Remote lookup(java.lang.String)]
Jan 19, 2005 4:51:20 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(10)-192.168.232.21: [192.168.232.21: sun.rmi.transport.DGCImpl[0:0:0, 2]: java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)]
Jan 19, 2005 4:51:20 PM sun.rmi.transport.Transport serviceCall
FINE: RMI TCP Connection(10)-192.168.232.21: [192.168.232.21] exception:
java.rmi.NoSuchObjectException: no such object in table
at sun.rmi.transport.Transport.serviceCall(Transport.java:112)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:554)
Jan 19, 2005 4:51:37 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(11)-192.168.232.21: [192.168.232.21: sun.rmi.transport.DGCImpl[0:0:0, 2]: void clean(java.rmi.server.ObjID[], long, java.rmi.dgc.VMID, boolean)]
Interesting to note is that the clean() call shown in the above log only occurs when the problem occurs.
Any tips or advice would be appreciated. Thanks.
<<Less