I tried to call a web service that changed recently from HTTP to HTTPS and I get this error :
java.net.SocketException: Unexpected end of file from server
Note that i had issues with certificates but i added them in the truststore via keytool, then i set System properties with:
System.setProperty("javax.net.ssl.trustStore", "C://Progra~1//Java//jdk1.8.0_201//jre//lib//security//cacerts");
System.setProperty("javax.net.ssl.trustStorePassword","changeit");
The error that appears:
main, handling exception: java.net.SocketException: Connection reset main, SEND TLSv1.2 ALERT: fatal, description = unexpected_message main, WRITE: TLSv1.2 Alert, length = 2 main,
Exception sending alert: java.net.SocketException: Connection reset by peer: socket write error main, called closeSocket()
thank you in advance for your intervention!