Issue
I was getting this error while running my application and somewhere I read that I it may be jdk incompatibility so I downgraded my jdk to jdk1.8.0_144
and driver was able to connect. So now when I create a jar it won't start so I decided to run it with Command Prompt. I was getting that:
The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Unexpected rethrowing".
How it can start from my IDE but error occur while start jar? What can I do to fix this?
Solution
So the reason why my IDE works and jar doesn't is because jar was running on new JRE version. After i run it with older it was working fine.
Answered By - Nem Jov