IntelliJ Idea
I have not able to compile the RestControl because of Security Exception and error message is as follows.
Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
I tried adding certificate to cacert file using key tool in my JRE lib but did not work. I have added it to the IntelliJ Idea tool when it asked to add untrusted certificates. I tried in both latest version 2017.3.3 and 2017.3.2. My current JDK and JRE versions are 1.8.0_144
Please sign in to leave a comment.
Does it build from the command line Maven in the console/terminal?
Did you add the certificate into the JVM that is used to run Maven from IntelliJ IDEA? Note that this JVM can be changed in the IDE Maven settings.
Can you explain how to do the mentioned steps? I am running on windows 7 32bit?
Run 'mvn clean install' in the command line to see if it completes without errors.
Maven JDK can be changed here:
The certificate can be installed into this JDK as described here.
I checked maven settings and pointed JRE to JDK one. Still same problem. See the image attached. I have checked the internet settings and we do not have any proxy. I imported the certificate by going to https://www.google.com and saving the certificate as one of post mentioned. I am surprised "why I have to do that". Also I imported the certificates from https://plugins.jetbrains.com. Nothing worked.
Run 'mvn clean install' in the command line to see if it completes without errors.
Got the same error from command line when running mvn clean install command
Here is the error.
C:\jprojects>mvn clean install
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.5.9.RELEASE/spring-boot-starter-parent-1.5.9.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:[FATAL] Non-resolvable parent POM for com.jm:remarketing:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: KIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at no local POM @ line 14, column 10
So, the issue has no relation to IntelliJ IDEA. JVM used to run Maven seems to miss the certificates needed to access this repository or your proxy (if any). There is nothing we can do to address this problem on IntelliJ IDEA side.
Problem has been fixed now. I have installed on my local JRE folder. That did not work. You have to install in JDK path. Below are the instructions for anyone who may encounter the same issue.
Get the certificate from https://repo.maven.apache.org/maven2/ and save into your local directory. Certificate type can be default one. In my case DER encoded. You have to install certificate in jdk path. In my case the path is C:\Program Files\Java\jdk1.8.0_144\jre\lib\security. Here is the command to install certificate. In command prompt, go to directory C:\Program Files\Java\jdk1.8.0_144\jre\lib\security and do the following.
keytool -import -file C:\maven.cer -keystore cacerts -alias mavencert
C:\maven.cer is the certificate I saved from https://repo.maven.apache.org/maven2/
Thanks,
Narsi
Hi, Serge,
I am having the same problem with @Npulukuri. I have read the post you provide here. Apart from the 64|32 bit stuff I don't see my system, I believe I execute other steps correctly.
I guess this is an Intellij issue.
Let me share more details with this issue:
Build #IC-181.4203.550, built on March 26, 2018
JRE: 1.8.0_152-release-1136-b20 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Thanks,
Jackal
IntelliJ IDEA JRE is in IDEA_HOME\jre64 directory, not `C:\Users\<username>\.IdeaIC2018.1\system\tasks`.
Nice ... Kind of wonder why it's related to JRE. This is the fasted Community Support I got. (btw, what's wrong with new version of GitBook :( )
thanks @Npulukuri and @serge - your instructions were helpful in resolving the same issue I was facing
help plz! um trying to create a new Maven project from 2020.3.2 and it throwing an 'Error Loading Default Project'
java.nio.file.NotDirectoryException: C:\Users\userProject\IdeaProjects\mav1\.idea\libraries
Please see https://youtrack.jetbrains.com/issue/IDEA-222640 for the workaround and more details.