I\'m trying to connect a Java Web API via HTTPS; however, an exception is thrown:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorExcept
This could happen if you are not running the command prompt in administrator mode. If you are using windows 7, you can go to run, type cmd and hit Ctrl+Shift+enter. This will open the command prompt in administrator mode. If not, you can also go to start -> all programs -> accessories -> right click command prompt and click 'run as administrator'.
If you are using windows8:
command prompt
command prompt
and click Run as administrator
. Then execute the keytool command.Check the write permissions on the keystore.
I got this error too even I ran cmd as an Administrator.
The root cause is: The file is from VCS(subversion, perforce, etc.), and when I checked the properties of this file, its' Attributes is Read-only.
So the solution is:
I had the same problem under Windows and could solve it by running cmd.exe as administrator (right-click in start menu, then "Run as administrator).