Re: intermittent connection callback exceptions
Mark Ackerman <[email protected]> Tue, 30 Sep 2008 16:28:53 -0700
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Organization | Resource Management Associates, Inc. |
| Message-ID | <[email protected]> |
thanks Peter. that seems to be the problem, we have a custom socket factory that you can limit the number of ports it can use (specified by an optional config file). Seems that all the ports are in use, (getting a "java.net.BindException: Address already in use"). Well they're not really in use, they just don't seem to be getting released fast enough. Not sure why. Since the customer has more people on their testing machine than I do on my development machine they're seeing the problem more often than I am. We didn't have this problem with the last release we did, or we didn't hit it hard enough with a limited number of ports. Mark Peter Jones wrote: > 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 > > =========================================================================== 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