3 Replies Latest reply: Nov 29, 2007 11:34 PM by 807581 RSS

    SSL stops working on redeploy

    807581
      I have an application I'm running in Sun App Server 9.1. It uses SSL to communicate with the credit card processing service we're using. Everything works perfectly when I first start up Sun AS. However, if I use the admin interface to redeploy the application WAR, I get the below (partial) exception. This goes away as soon as I shut down the Sun AS instance and restart it. As you'll see from the stack trace, the application is based in Spring, but I really don't think this is a Spring issue. I could potentially buy that it's a Spring-Sun AS integration issue. :)

      Any help is appreciated! I'm completely flummoxed as to where to start fixing this one.
      ...<snipped out Spring exception translations>...
      Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: The certificate chain from the server is not trusted+
      +     at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)+
      +     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1520)+
      +     at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:182)+
      +     at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:176)+
      +     at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:975)+
      +     at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:123)+
      +     at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:511)+
      +     at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:449)+
      +     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:817)+
      +     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1029)+
      +     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1056)+
      +     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1040)+
      +     at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:405)+
      +     at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)+
      +     at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)+
      +     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)+
      +     at org.springframework.ws.transport.http.HttpUrlConnection.getRequestOutputStream(HttpUrlConnection.java:71)+
      +     at org.springframework.ws.transport.AbstractSenderConnection$RequestTransportOutputStream.createOutputStream(AbstractSenderConnection.java:93)+
      +     at org.springframework.ws.transport.TransportOutputStream.getOutputStream(TransportOutputStream.java:41)+
      +     at org.springframework.ws.transport.TransportOutputStream.close(TransportOutputStream.java:48)+
      +     at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:40)+
      +     at org.springframework.ws.client.core.WebServiceTemplate.sendRequest(WebServiceTemplate.java:539)+
      +     at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:397)+
      +     ... 52 more+
      +Caused by: java.security.cert.CertificateException: The certificate chain from the server is not trusted+
      +     at com.sun.enterprise.admin.jmx.remote.https.SunOneBasicX509TrustManager.checkCertificate(SunOneBasicX509TrustManager.java:264)+
      +     at com.sun.enterprise.admin.jmx.remote.https.SunOneBasicX509TrustManager.checkServerTrusted(SunOneBasicX509TrustManager.java:141)+
      +     at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:967)+
      +     at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:123)+
      +     at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:511)+
      +     at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:449)+
      +     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:817)+
      +     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1029)+
      +     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1056)+
      +     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1040)+
      +     at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:405)+
      +     at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)+
      +     at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)+
      +     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)+
      +     at org.springframework.ws.transport.http.HttpUrlConnection.getRequestOutputStream(HttpUrlConnection.java:71)+
      +     at org.springframework.ws.transport.AbstractSenderConnection$RequestTransportOutputStream.createOutputStream(AbstractSenderConnection.java:93)+
      +     at org.springframework.ws.transport.TransportOutputStream.getOutputStream(TransportOutputStream.java:41)+
      +     at org.springframework.ws.transport.TransportOutputStream.write(TransportOutputStream.java:60)+
      +     at com.sun.xml.messaging.saaj.soap.MessageImpl.writeTo(MessageImpl.java:1219)+
      +     at org.springframework.ws.soap.saaj.Saaj13Implementation.writeTo(Saaj13Implementation.java:283)+
      +     at org.springframework.ws.soap.saaj.SaajSoapMessage.writeTo(SaajSoapMessage.java:105)+
      +     at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:36)+
      +     ... 54 more+