I have a problem with Weblogic accessing an HTTPS server, I can access other HTTPS URLs like google or microsoft. Code trying to connect to url:
URL url = new URL("https://myserver.com"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("User-Agent", "Mozilla/5.0");
I get the following stack trace:
java.io.IOException: Connection closed, EOF detected at weblogic.socket.JSSEFilterImpl.handleUnwrapResults(JSSEFilterImpl.java:539) at weblogic.socket.JSSEFilterImpl.unwrapAndHandleResults(JSSEFilterImpl.java:456) at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:80) at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:64) at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:59) at weblogic.socket.JSSEFilterImpl.write(JSSEFilterImpl.java:390) at weblogic.socket.JSSESocket$JSSEOutputStream.write(JSSESocket.java:78) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at java.io.FilterOutputStream.flush(FilterOutputStream.java:140) at weblogic.net.http.HttpURLConnection.writeRequests(HttpURLConnection.java:186) at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:400) at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:37) at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1005)
In the Weblogic console, I have the following option set: true: Environment> Servers> [my server]> SSL> Advanced> Use JSSE SSL
If I disable this property, I get the following stack trace:
javax.net.ssl.SSLKeyException: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received. at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException(Unknown Source) at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent(Unknown Source) at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown Source) at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source) at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Source) at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown Source) at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source) at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source) at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source) at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source) at com.certicom.tls.record.WriteHandler.write(Unknown Source) at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at java.io.FilterOutputStream.flush(FilterOutputStream.java:140) at weblogic.net.http.HttpURLConnection.writeRequests(HttpURLConnection.java:186) at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:400) at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:37) at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1005)
The server I'm trying to access has a verified certificate, and browsers do not complain about it.
thanks
source share