Springboot Gradle : PKIX path building failed - spring

I am trying to build some services in my local. But while building I am getting following error
A problem occurred configuring root project 'MyService'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.2.7.RELEASE.
Required by:
project :
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.2.7.RELEASE.
> Could not get resource 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-gradle-plugin/2.2.7.RELEASE/spring-boot-gradle-plugin-2.2.7.RELEASE.pom'.
> Could not HEAD 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-gradle-plugin/2.2.7.RELEASE/spring-boot-gradle-plugin-2.2.7.RELEASE.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Similar PKIX issue I am facing with all the services.
I am using IntelliJ and project uses Gradle.
This is also a new system, but I have installed JDK in the macOS. And JDK path shows correctly in the project.
When I open the dependency URL I am able to access in my chrome browser.
Most solution given seems to be for windows.
Anything differently do I have to do for macOS?

Related

Is it posssible to preinstall the files downloaded by graalvm nativeCompile to avoid using internet on build Spring (native) Boot 3?

Error downloading component catalog from https://www.graalvm.org/component-catalog/v2/graal-updater-component-catalog-java17.properties: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
Is there a way to preinstall this file to avoid using Internet in build ?

Failed to collect dependencies at org.bouncycastle:bc-fips:jar:1.0.2.3

I got an error when I try to build my project using Jenkins
> [ERROR] Failed to execute goal on project luwak-task-storage: Could not resolve dependencies for project
> com.trendmicro.luwak:luwak-task-storage:jar:3.0.0-SNAPSHOT: Failed to
> collect dependencies at org.bouncycastle:bc-fips:jar:1.0.2.3: Failed
> to read artifact descriptor for org.bouncycastle:bc-fips:jar:1.0.2.3:
> Could not transfer artifact org.bouncycastle:bc-fips:pom:1.0.2.3
> from/to central
> (https://nexus.trendmicro.com/nexus/repository/maven-central/):
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to
> find valid certification path to requested target -> [Help 1]
I got a dependency called org.bouncycastle:bc-fips:pom:1.0.2.3, it is the library that cannot be resolved, but I don't know why.
I can build my project successfully on local, but when using Jenkins, I got this error.
I have read some threads but none of them resolve my issue. Please help.
I got a dependency called org.bouncycastle:bc-fips:pom:1.0.2.3, it is
the library that cannot be resolved, but I don't know why?
Because your server don't have that dependency/library yet and failed prior to get those required artifacts due to the following reason:
Your system (Jenkins server) is unable to validate the server identity from where it is trying pulling the artifacts and hence unable to establish a proper channel for communication.
If you recognized & trust target server then you can add the CA certs on Jenkins server (most probably in java keystore utilize by Jenkins) to validate the handshake process.
https://stackoverflow.com/a/63491078/9926179

Eclipse Gradle Installation error : unable to find valid certification path to requested target

I'm trying to install Gradle IDE pack from Eclipse Marketplace. I'm getting error as "Unable to read repository at https://nodeclipse.github.io/updates/gradle-ide-pack/content.xml.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
Could anyone help me to fix this issue.
Thanks in Advance
Regards,
VR

How to understand/fix 'Could not resolve all files for configuration' during IntelliJ-gradle plugin build

I am just getting started making plugins and am hoping to make an IntelliJ plugin using gradle and java. For now, just to learn the basic, all I am trying to do is change the menubar in IntelliJ. But, following this IntelliJ tutorial, I created a Gradle project with Java and IntelliJ Platform Plugin as the additional libraries/frameworks, and when I build, even if I do not change anything at all once the project is created, I get an error I do not understand and do not know how to fix:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'project.project'.
> Could not resolve all files for configuration ':detachedConfiguration1'.
> Could not resolve com.jetbrains.intellij.idea:ideaIC:2019.2.3.
Required by:
project :
> Could not resolve com.jetbrains.intellij.idea:ideaIC:2019.2.3.
> Could not get resource 'https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2019.2.3/ideaIC-2019.2.3.pom'.
> Could not GET 'https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2019.2.3/ideaIC-2019.2.3.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
However, when I create a gradle project, and do not use the IntelliJ Platform Plugin, I am able to build and create tasks etc. and as best I can tell it works fine.
I'm using:
IntelliJ 2019.2.3
Gradle 5.6.2
Java 8
I assume that there is something simple I am missing since I am so new but I haven't seen solutions to this issue elsewhere that I was able to use. Any help with this is appreciated.
The last line in the errors looks like a problem with the chain of certificates. This happens when the Gradle plugin attempts to download a build of IntelliJ IDEA v2019.2.3. But the Gradle plugin for IntelliJ is not involved when you build a generic project.
Have you tried pasting the URL from the failed GET statement into the address bar of your browser?
www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2019.2.3/ideaIC-2019.2.3.pom
Does the POM file download or do you get an error about certificates?
If you get certificate errors, searching for sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target will yield postings about how to import a server certificate and install it in your JDK's keystore.

Maven : PKIX path building failed

Maven build throwing this exception
Failed to execute goal on project mdf-portal-3rdParty: Could not
resolve dependencies for project
com.alu.ipprd.bsm.soa:mdf-portal-3rdParty:jar:0.0.1-SNAPSHOT: Failed
to collect dependencies at
com.alu.ipprd.bsm.soa.portal.soo:common:jar:0.0.1-SNAPSHOT: Failed to
read artifact descriptor for
com.alu.ipprd.bsm.soa.portal.soo:common:jar:0.0.1-SNAPSHOT: Could not
transfer artifact
com.alu.ipprd.bsm.soa.portal.soo:common:pom:0.0.1-SNAPSHOT from/to
googlecode.com
(http://gmaps4jsf.googlecode.com/svn/trunk/gmaps4jsf-repo):
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target -> [Help 1]
I did not made any single change in pom.xml file ,suddenly after taking update from SVN i am getting this exception.
I will want to know
What is the cause of this problem?
Is this issue due to anything change in SVN server?
Even no any change in local machine why this build fail error?
Something wrong with Gmaps4jsf repository ?(May be due to closing of Google code)
maybe your maven version isnot the proper version. I encounter this problem in 3.2.3. and resolve it in 3.3.9 version.
you need to add ssl certificate to your jre installation
Please refer this answer and follow steps!
Step 1 - Get Root CA certificate
Step 2 - install that certificate at jre cacerts file

Resources