JDeveloper cert issue
up vote
3
down vote
favorite
I am using JDeveloper 12c trying to connect to secure web service SSL.
I added my both certificates RootCA and intermediate into trusted store in my JAVA_HOME directory.
Check below my source code:
SSLSocketFactory sslSocketFactory = sslcontext.getSocketFactory();
HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
HttpsURLConnection httpsConn = (HttpsURLConnection)url.openConnection();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
String xmlInput = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.gdsp.vodafone.com/">n" +
" <soapenv:Header>n" +
" <ws:gdspHeader>n" +
" <gdspCredentials>n" +
" <password>***</password>n" +
" <userId>zainmdw</userId>n" +
" </gdspCredentials>n" +
" </ws:gdspHeader>n" +
" </soapenv:Header>n" +
" <soapenv:Body>n" +
" <ws:submitReportRequest>n" +
" <reportName>" + reportname + "</reportName>n" +
" <reportFormat>XML</reportFormat>n" +
" <reportParameters>n" +
" <parameter>n" +
" <name>CUSTOMER_CODE</name>n" +
" <value>" + customer_code + "</value>n" +
" </parameter>n" +
" <parameter>n" +
" <name>PERIOD_START</name>n" +
" <value>" + period_start + "</value>n" +
" </parameter>n" +
" </reportParameters>n" +
" <notificationType>N</notificationType>n" +
" <notificationUser>zainmdw</notificationUser>n" +
" <reportPriority>1</reportPriority>n" +
" </ws:submitReportRequest>n" +
" </soapenv:Body>n" +
"</soapenv:Envelope>";
byte buffer = new byte[xmlInput.length()];
buffer = xmlInput.getBytes();
bout.write(buffer);
byte b = bout.toByteArray();
String SOAPAction =
"https://m2mprdapi.vodafone.com:11851/GDSPWebServices/ReportRequestService";
// Set the appropriate HTTP parameters.
httpsConn.setRequestProperty("Content-Length",
String.valueOf(b.length));
httpsConn.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
httpsConn.setRequestProperty("SOAPAction", "submitReportRequest");
httpsConn.setRequestMethod("POST");
httpsConn.setDoOutput(true);
httpsConn.setDoInput(true);
OutputStream out = httpsConn.getOutputStream();
And here is the trace:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
sun.security.ssl.Alerts.getSSLException(Alerts.java:192) StackTraceElement
sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) StackTraceElement
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) StackTraceElement
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) StackTraceElement
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514) StackTraceElement
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) StackTraceElement
sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) StackTraceElement
sun.security.ssl.Handshaker.process_record(Handshaker.java:961) StackTraceElement
sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) StackTraceElement
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) StackTraceElement
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) StackTraceElement
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) StackTraceElement
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) StackTraceElement
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) StackTraceElement
sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316) StackTraceElement
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291) StackTraceElement
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) StackTraceElement
sa.zainksa.BusinessLogic.VF_APIs.SendSoapRequest(VF_APIs.java:149) StackTraceElement
sa.zain.mdwSessionEJBClient.main(mdwSessionEJBClient.java:49) StackTraceElement
I did a lot of research to get solution for this exception with no luck to have a solution.
Any one can help me please?
java ssl ssl-certificate x509certificate jdeveloper
add a comment |
up vote
3
down vote
favorite
I am using JDeveloper 12c trying to connect to secure web service SSL.
I added my both certificates RootCA and intermediate into trusted store in my JAVA_HOME directory.
Check below my source code:
SSLSocketFactory sslSocketFactory = sslcontext.getSocketFactory();
HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
HttpsURLConnection httpsConn = (HttpsURLConnection)url.openConnection();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
String xmlInput = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.gdsp.vodafone.com/">n" +
" <soapenv:Header>n" +
" <ws:gdspHeader>n" +
" <gdspCredentials>n" +
" <password>***</password>n" +
" <userId>zainmdw</userId>n" +
" </gdspCredentials>n" +
" </ws:gdspHeader>n" +
" </soapenv:Header>n" +
" <soapenv:Body>n" +
" <ws:submitReportRequest>n" +
" <reportName>" + reportname + "</reportName>n" +
" <reportFormat>XML</reportFormat>n" +
" <reportParameters>n" +
" <parameter>n" +
" <name>CUSTOMER_CODE</name>n" +
" <value>" + customer_code + "</value>n" +
" </parameter>n" +
" <parameter>n" +
" <name>PERIOD_START</name>n" +
" <value>" + period_start + "</value>n" +
" </parameter>n" +
" </reportParameters>n" +
" <notificationType>N</notificationType>n" +
" <notificationUser>zainmdw</notificationUser>n" +
" <reportPriority>1</reportPriority>n" +
" </ws:submitReportRequest>n" +
" </soapenv:Body>n" +
"</soapenv:Envelope>";
byte buffer = new byte[xmlInput.length()];
buffer = xmlInput.getBytes();
bout.write(buffer);
byte b = bout.toByteArray();
String SOAPAction =
"https://m2mprdapi.vodafone.com:11851/GDSPWebServices/ReportRequestService";
// Set the appropriate HTTP parameters.
httpsConn.setRequestProperty("Content-Length",
String.valueOf(b.length));
httpsConn.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
httpsConn.setRequestProperty("SOAPAction", "submitReportRequest");
httpsConn.setRequestMethod("POST");
httpsConn.setDoOutput(true);
httpsConn.setDoInput(true);
OutputStream out = httpsConn.getOutputStream();
And here is the trace:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
sun.security.ssl.Alerts.getSSLException(Alerts.java:192) StackTraceElement
sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) StackTraceElement
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) StackTraceElement
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) StackTraceElement
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514) StackTraceElement
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) StackTraceElement
sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) StackTraceElement
sun.security.ssl.Handshaker.process_record(Handshaker.java:961) StackTraceElement
sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) StackTraceElement
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) StackTraceElement
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) StackTraceElement
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) StackTraceElement
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) StackTraceElement
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) StackTraceElement
sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316) StackTraceElement
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291) StackTraceElement
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) StackTraceElement
sa.zainksa.BusinessLogic.VF_APIs.SendSoapRequest(VF_APIs.java:149) StackTraceElement
sa.zain.mdwSessionEJBClient.main(mdwSessionEJBClient.java:49) StackTraceElement
I did a lot of research to get solution for this exception with no luck to have a solution.
Any one can help me please?
java ssl ssl-certificate x509certificate jdeveloper
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I am using JDeveloper 12c trying to connect to secure web service SSL.
I added my both certificates RootCA and intermediate into trusted store in my JAVA_HOME directory.
Check below my source code:
SSLSocketFactory sslSocketFactory = sslcontext.getSocketFactory();
HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
HttpsURLConnection httpsConn = (HttpsURLConnection)url.openConnection();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
String xmlInput = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.gdsp.vodafone.com/">n" +
" <soapenv:Header>n" +
" <ws:gdspHeader>n" +
" <gdspCredentials>n" +
" <password>***</password>n" +
" <userId>zainmdw</userId>n" +
" </gdspCredentials>n" +
" </ws:gdspHeader>n" +
" </soapenv:Header>n" +
" <soapenv:Body>n" +
" <ws:submitReportRequest>n" +
" <reportName>" + reportname + "</reportName>n" +
" <reportFormat>XML</reportFormat>n" +
" <reportParameters>n" +
" <parameter>n" +
" <name>CUSTOMER_CODE</name>n" +
" <value>" + customer_code + "</value>n" +
" </parameter>n" +
" <parameter>n" +
" <name>PERIOD_START</name>n" +
" <value>" + period_start + "</value>n" +
" </parameter>n" +
" </reportParameters>n" +
" <notificationType>N</notificationType>n" +
" <notificationUser>zainmdw</notificationUser>n" +
" <reportPriority>1</reportPriority>n" +
" </ws:submitReportRequest>n" +
" </soapenv:Body>n" +
"</soapenv:Envelope>";
byte buffer = new byte[xmlInput.length()];
buffer = xmlInput.getBytes();
bout.write(buffer);
byte b = bout.toByteArray();
String SOAPAction =
"https://m2mprdapi.vodafone.com:11851/GDSPWebServices/ReportRequestService";
// Set the appropriate HTTP parameters.
httpsConn.setRequestProperty("Content-Length",
String.valueOf(b.length));
httpsConn.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
httpsConn.setRequestProperty("SOAPAction", "submitReportRequest");
httpsConn.setRequestMethod("POST");
httpsConn.setDoOutput(true);
httpsConn.setDoInput(true);
OutputStream out = httpsConn.getOutputStream();
And here is the trace:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
sun.security.ssl.Alerts.getSSLException(Alerts.java:192) StackTraceElement
sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) StackTraceElement
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) StackTraceElement
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) StackTraceElement
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514) StackTraceElement
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) StackTraceElement
sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) StackTraceElement
sun.security.ssl.Handshaker.process_record(Handshaker.java:961) StackTraceElement
sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) StackTraceElement
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) StackTraceElement
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) StackTraceElement
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) StackTraceElement
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) StackTraceElement
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) StackTraceElement
sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316) StackTraceElement
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291) StackTraceElement
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) StackTraceElement
sa.zainksa.BusinessLogic.VF_APIs.SendSoapRequest(VF_APIs.java:149) StackTraceElement
sa.zain.mdwSessionEJBClient.main(mdwSessionEJBClient.java:49) StackTraceElement
I did a lot of research to get solution for this exception with no luck to have a solution.
Any one can help me please?
java ssl ssl-certificate x509certificate jdeveloper
I am using JDeveloper 12c trying to connect to secure web service SSL.
I added my both certificates RootCA and intermediate into trusted store in my JAVA_HOME directory.
Check below my source code:
SSLSocketFactory sslSocketFactory = sslcontext.getSocketFactory();
HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
HttpsURLConnection httpsConn = (HttpsURLConnection)url.openConnection();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
String xmlInput = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.gdsp.vodafone.com/">n" +
" <soapenv:Header>n" +
" <ws:gdspHeader>n" +
" <gdspCredentials>n" +
" <password>***</password>n" +
" <userId>zainmdw</userId>n" +
" </gdspCredentials>n" +
" </ws:gdspHeader>n" +
" </soapenv:Header>n" +
" <soapenv:Body>n" +
" <ws:submitReportRequest>n" +
" <reportName>" + reportname + "</reportName>n" +
" <reportFormat>XML</reportFormat>n" +
" <reportParameters>n" +
" <parameter>n" +
" <name>CUSTOMER_CODE</name>n" +
" <value>" + customer_code + "</value>n" +
" </parameter>n" +
" <parameter>n" +
" <name>PERIOD_START</name>n" +
" <value>" + period_start + "</value>n" +
" </parameter>n" +
" </reportParameters>n" +
" <notificationType>N</notificationType>n" +
" <notificationUser>zainmdw</notificationUser>n" +
" <reportPriority>1</reportPriority>n" +
" </ws:submitReportRequest>n" +
" </soapenv:Body>n" +
"</soapenv:Envelope>";
byte buffer = new byte[xmlInput.length()];
buffer = xmlInput.getBytes();
bout.write(buffer);
byte b = bout.toByteArray();
String SOAPAction =
"https://m2mprdapi.vodafone.com:11851/GDSPWebServices/ReportRequestService";
// Set the appropriate HTTP parameters.
httpsConn.setRequestProperty("Content-Length",
String.valueOf(b.length));
httpsConn.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
httpsConn.setRequestProperty("SOAPAction", "submitReportRequest");
httpsConn.setRequestMethod("POST");
httpsConn.setDoOutput(true);
httpsConn.setDoInput(true);
OutputStream out = httpsConn.getOutputStream();
And here is the trace:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
sun.security.ssl.Alerts.getSSLException(Alerts.java:192) StackTraceElement
sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) StackTraceElement
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) StackTraceElement
sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) StackTraceElement
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514) StackTraceElement
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) StackTraceElement
sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) StackTraceElement
sun.security.ssl.Handshaker.process_record(Handshaker.java:961) StackTraceElement
sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) StackTraceElement
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) StackTraceElement
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) StackTraceElement
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) StackTraceElement
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) StackTraceElement
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) StackTraceElement
sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316) StackTraceElement
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291) StackTraceElement
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) StackTraceElement
sa.zainksa.BusinessLogic.VF_APIs.SendSoapRequest(VF_APIs.java:149) StackTraceElement
sa.zain.mdwSessionEJBClient.main(mdwSessionEJBClient.java:49) StackTraceElement
I did a lot of research to get solution for this exception with no luck to have a solution.
Any one can help me please?
java ssl ssl-certificate x509certificate jdeveloper
java ssl ssl-certificate x509certificate jdeveloper
edited Nov 21 at 10:16
asked Nov 21 at 9:08
Ahmed Hassan
164
164
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
The previous exception was resolved by assigning SSLSocetFactory to HTTPsURLConnection as per below source code.
// HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
HttpsURLConnection httpsConn = (HttpsURLConnection) url.openConnection();
httpsConn.setDefaultSSLSocketFactory(sslSocketFactory);
But again getting new exception that Software caused connection abort: recv failed.
main, WRITE: TLSv1.2 Handshake, length = 40
main, waiting for close_notify or alert: state 1
main, **Exception while waiting for close java.net.SocketException: Software caused
connection abort: recv failed**
main, handling exception: java.net.SocketException: Software caused connection abort:
recv failed
%% Invalidated: [Session-1, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]
main, SEND TLSv1.2 ALERT: fatal, description = unexpected_message
main, WRITE: TLSv1.2 Alert, length = 26
main, Exception sending alert: **java.net.SocketException: Software caused
connection** abort: socket write error
main, called closeSocket()
main, called close()
main, called closeInternal(true)
Would you please help in above exception.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The previous exception was resolved by assigning SSLSocetFactory to HTTPsURLConnection as per below source code.
// HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
HttpsURLConnection httpsConn = (HttpsURLConnection) url.openConnection();
httpsConn.setDefaultSSLSocketFactory(sslSocketFactory);
But again getting new exception that Software caused connection abort: recv failed.
main, WRITE: TLSv1.2 Handshake, length = 40
main, waiting for close_notify or alert: state 1
main, **Exception while waiting for close java.net.SocketException: Software caused
connection abort: recv failed**
main, handling exception: java.net.SocketException: Software caused connection abort:
recv failed
%% Invalidated: [Session-1, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]
main, SEND TLSv1.2 ALERT: fatal, description = unexpected_message
main, WRITE: TLSv1.2 Alert, length = 26
main, Exception sending alert: **java.net.SocketException: Software caused
connection** abort: socket write error
main, called closeSocket()
main, called close()
main, called closeInternal(true)
Would you please help in above exception.
add a comment |
up vote
0
down vote
The previous exception was resolved by assigning SSLSocetFactory to HTTPsURLConnection as per below source code.
// HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
HttpsURLConnection httpsConn = (HttpsURLConnection) url.openConnection();
httpsConn.setDefaultSSLSocketFactory(sslSocketFactory);
But again getting new exception that Software caused connection abort: recv failed.
main, WRITE: TLSv1.2 Handshake, length = 40
main, waiting for close_notify or alert: state 1
main, **Exception while waiting for close java.net.SocketException: Software caused
connection abort: recv failed**
main, handling exception: java.net.SocketException: Software caused connection abort:
recv failed
%% Invalidated: [Session-1, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]
main, SEND TLSv1.2 ALERT: fatal, description = unexpected_message
main, WRITE: TLSv1.2 Alert, length = 26
main, Exception sending alert: **java.net.SocketException: Software caused
connection** abort: socket write error
main, called closeSocket()
main, called close()
main, called closeInternal(true)
Would you please help in above exception.
add a comment |
up vote
0
down vote
up vote
0
down vote
The previous exception was resolved by assigning SSLSocetFactory to HTTPsURLConnection as per below source code.
// HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
HttpsURLConnection httpsConn = (HttpsURLConnection) url.openConnection();
httpsConn.setDefaultSSLSocketFactory(sslSocketFactory);
But again getting new exception that Software caused connection abort: recv failed.
main, WRITE: TLSv1.2 Handshake, length = 40
main, waiting for close_notify or alert: state 1
main, **Exception while waiting for close java.net.SocketException: Software caused
connection abort: recv failed**
main, handling exception: java.net.SocketException: Software caused connection abort:
recv failed
%% Invalidated: [Session-1, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]
main, SEND TLSv1.2 ALERT: fatal, description = unexpected_message
main, WRITE: TLSv1.2 Alert, length = 26
main, Exception sending alert: **java.net.SocketException: Software caused
connection** abort: socket write error
main, called closeSocket()
main, called close()
main, called closeInternal(true)
Would you please help in above exception.
The previous exception was resolved by assigning SSLSocetFactory to HTTPsURLConnection as per below source code.
// HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
HttpsURLConnection httpsConn = (HttpsURLConnection) url.openConnection();
httpsConn.setDefaultSSLSocketFactory(sslSocketFactory);
But again getting new exception that Software caused connection abort: recv failed.
main, WRITE: TLSv1.2 Handshake, length = 40
main, waiting for close_notify or alert: state 1
main, **Exception while waiting for close java.net.SocketException: Software caused
connection abort: recv failed**
main, handling exception: java.net.SocketException: Software caused connection abort:
recv failed
%% Invalidated: [Session-1, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]
main, SEND TLSv1.2 ALERT: fatal, description = unexpected_message
main, WRITE: TLSv1.2 Alert, length = 26
main, Exception sending alert: **java.net.SocketException: Software caused
connection** abort: socket write error
main, called closeSocket()
main, called close()
main, called closeInternal(true)
Would you please help in above exception.
answered Nov 26 at 5:56
Ahmed Hassan
164
164
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53408549%2fjdeveloper-cert-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown