Re: intermittent connection callback exceptions
Peter Jones <[email protected]> Tue, 30 Sep 2008 16:42:10 -0400
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <20080930204210.GA26025@east> |
On Mon, Sep 29, 2008 at 03:37:16PM -0700, Mark Ackerman wrote: > Out client is calling on the server to perform some work for it, > which can take a bit of time, so we pass a callback object that the > client has just created and exported, but no bound in the registry. > Every so often it will throw a NullPointerException when we try and > call on the remote object. My customers are seeing it throw the > exception about one in three times on their systems, and I'm seeing > around one in seven on mine. > > Exception is: > java.lang.NullPointerException > at sun.rmi.transport.tcp.TCPConnection.getOutputStream(TCPConnection.java:66) > at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:202) > at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184) > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110) > at hec.client.RmiProgressImpl_Stub.printStatus(Unknown Source) > at hec.server.RmiAppImpl.openWorkspace(RmiAppImpl.java:745) > > using java 1.6. client is XP and the server is Solaris. > > So any ideas of where to look? Don't see any exceptions generated > on the client side. The only explanation that I can think of is that a socket factory is being used for this callback invocation, and that socket factory's createSocket method is sometimes returning null-- which results in a NullPointerException when the method at the top of that stack trace attempts to invoke Socket.getOutputStream on the returned value. -- Peter =========================================================================== 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