I have been able to build Java project for years but recently I can no longer build anyone of them.
(see below for the actual error)
My coworkers are able to build the same projects with the same files. So obviously I suspected the Java certificates. I got a file from one of my coworkers that can build the projects and copied them in 3 locations where different versions of Java are located but that did not help.
Any ideas please?
And the error message:
C:\build\prod\Java\SampleProject>gradlew build -x test
Downloading https://services.gradle.org/distributions/gradle-6.3-bin.zip
Exception in thread "main" javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:128)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)