Okay, that makes sense. So you are saying that the SSLSocket socket is set to null after that first line. Why would it return null? Why wouldn't the call to getSocket() return the socket?
Thanks again Jeremy Hicks Novell, Inc., the leading provider of information solutions http://www.novell.com >>> Roland Weber <[EMAIL PROTECTED]> 07/17/06 11:53 AM >>> Hi Jeremy, > SSLSocket socket = (SSLSocket)MyConnectionHelper.getSocket(conn); > SSLSession session = socket.getSession(); > session.invalidate(); > > The exception seems to be coming from: > > SSLSession session = socket.getSession(); > > I guess I don't understand why every SSLSocket wouldn't have a session. Think again. A NullPointerException isn't thrown because a method returns null, it's thrown because the object on which you are calling the method is null. An SSLSocket wouldn't have a session if it hasn't been opened yet, for starters. Communication problem? Handshake failure? Session invalidated by server? cheers, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]