I am working on STS and while creating a new spring-boot project, it shows following errors: I tried two options but it didn't work.
Option-1:
Service URL:https://start.spring.io
Error Message: SunCertPathBuilderException: unable to find valid certification path to requested target
I followed below instructions but didn't work
Export the corporate certificate (There may be other easier ways of doing this)
On Chrome, I went to https://start.spring.io
On the location bar clicked on the 'Lock' symbol next to https.
Selected 'Certificate(Valid)' on the ensuing pop-up.
On the resulting dialog box, clicked on the 'Certificate Path' tab, from under certificate path tree selected the root node, and then clicked on 'View Certificate'
On the resulting dialog box, clicked on the 'Details' tab and then clicked on 'Copy to File'
This brings up the 'Export wizard', clicked on 'Next'.
Left the certificate format to default 'DER encoded..', clicked on 'Next'.
Provided file name (.cer extension) for the certificate.
Clicked Finish.
The above steps exported a certificate to a file that I imported into truststore (cacerts).
To import
Opened a 'Command' prompt as Administrator to import the certificate
Went to bin directory of Java installation (this step is not needed if jre/bin is in your path)
Ran the following:
C:\Program Files\Java\jre1.8.0_271\bin>keytool -importcert -alias your-alias -keystore "C:\Program Files\Java\jre1.8.0_271\lib\security\cacerts" -storepass changeit -file C:\certificate-file-location\saved-certificate-file.cer
(Substitute your java location, certificate file location and certificate file name as appropriate. The 'storepass' should be 'changeit'.)
Restarted STS
I tried below options also but it didn't work
Updated below properties in STS.ini file and restarted the STS but no use
-Djavax.net.ssl.trustStore=C:\Program Files\Java\jdk\jre1.8.0_271\lib\security\cacerts
-Djava.net.ssl.trustStorePassword=changeit
Option-2:
Service URL:http://start.spring.io
Error Message: JSONException: A JSONObject text must begin with '{' at character 1
Note: I am also behind a corporate proxy.
I tried all network connections options also like: Manual, DIrect and Native no use
Current STS version:3.8.4