The error is occurring because the SSL certificate isn’t trusted by JAVA. So you will have to add the certificate to Java certificate store (which is called cacerts) using the keytool command.
Use this keytool command -
keytool -import -trustcacerts -file NewRootCACertificate.crt -keystore "C:\Program Files\Java\jre1.8.0_31\lib\security\cacerts"
Execute the above command in the Command prompt (Administrator) mode.
Take a note that - Default password for cacerts is
In the Command prompt you can’t see the password you type.
The default password is
Try inserting the above password when prompted on CMD.