You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Bhattacharjee, V. (Vani)" <Va...@voya.com> on 2018/05/12 09:37:07 UTC

Maven Project Creation Error

Hi ,

I am kind of new to Maven.

I have following JDK and Maven version


C:\Users\iXXXXXX>java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) Client VM (build 25.171-b11, mixed mode)

C:\Users\iXXXXXX>mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T14:49:0
5-05:00)
Maven home: C:\Users\iXXXXXX\Documents\apache-maven-3.5.3\bin\..
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.8.0_171\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

I have also set the Environment variables - JAVA_HOME, M2_HOME and edited the path variable to both the bin folders.

I am trying to create a new Maven Project in Eclipse in two ways but not successful


1.       I am getting following error when I try to  create from File --> New --> Maven Project --> Entering Group Id and Artifact Id --> Finish.

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
Could not write artifact lastUpdated status
C:\Users\i716181\.m2\repository\org\apache\maven\archetypes\maven-archetype-quickstart\1.1\m2e-lastUpdated.properties (Access is denied).



2.       I tried to create a simple project and then convert to Maven. This is successful but when I try to add dependency for selenium using the Add dependency wizard - I get this error

"Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:3.12.0

org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:3.12.0
                at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
                at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
                at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
                at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:172)
                at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:215)
                at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:188)
                at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:119)
                at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProject(MavenImpl.java:636)
                at org.eclipse.m2e.core.internal.project.registry.DefaultMavenDependencyResolver.resolveProjectDependencies(DefaultMavenDependencyResolver.java:63)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refreshPhase2(ProjectRegistryManager.java:530)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:492)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:1)
                at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
                at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:496)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:351)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:298)
                at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:154)
                at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:89)
                at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
                at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
                at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
                at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
                at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
                at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
                at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
                at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
                at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
                at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
                at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
                at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
                at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
                at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
                at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)
                at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232)
                at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.seleniumhq.selenium:selenium-java:pom:3.12.0 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
                at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
                at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
                at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
                at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
                ... 41 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.seleniumhq.selenium:selenium-java:pom:3.12.0 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
                at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:904)
                at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
                at io.takari.aether.connector.AetherRepositoryConnector$GetTask.flush(AetherRepositoryConnector.java:678)
                at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:310)
                at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
                at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
                ... 44 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
                at sun.security.ssl.Alerts.getSSLException(Unknown Source)
                at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
                at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
                at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
                at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
                at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
                at sun.security.ssl.Handshaker.processLoop(Unknown Source)
                at sun.security.ssl.Handshaker.process_record(Unknown Source)
                at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
                at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
                at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
                at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
                at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:268)
                at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:238)
                at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:149)
                at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:192)
                at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
                at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
                at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
                at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
                at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
                at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
                at okhttp3.RealCall.execute(RealCall.java:69)
                at io.takari.aether.okhttp.OkHttpAetherClient.execute(OkHttpAetherClient.java:207)
                at io.takari.aether.okhttp.OkHttpAetherClient.get(OkHttpAetherClient.java:153)
                at io.takari.aether.connector.AetherRepositoryConnector$GetTask.getResponse(AetherRepositoryConnector.java:672)
                at io.takari.aether.connector.AetherRepositoryConnector$GetTask.resumableGet(AetherRepositoryConnector.java:587)
                at io.takari.aether.connector.AetherRepositoryConnector$GetTask.run(AetherRepositoryConnector.java:453)
                at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:304)
                ... 46 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
                at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
                at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
                at sun.security.validator.Validator.validate(Unknown Source)
                at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
                at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
                at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
                ... 79 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
                at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
                at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
                at java.security.cert.CertPathBuilder.build(Unknown Source)
                ... 85 more"


Thanks and Regards,
Vani
--------------------------------------------------------- NOTICE: The information contained in this electronic mail message is confidential and intended only for certain recipients. If you are not an intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication and any attachments is strictly prohibited. If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it. ============================================================================================

Re: Maven Project Creation Error

Posted by "theit@gmx.de" <th...@gmx.de>.
Hi,

> I am kind of new to Maven.
> 
> I have following JDK and Maven version

(...)

> 1.       I am getting following error when I try to  create from File --> New --> Maven Project --> Entering Group Id and Artifact Id --> Finish.
> 
> Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
> Could not write artifact lastUpdated status
> C:\Users\i716181\.m2\repository\org\apache\maven\archetypes\maven-archetype-quickstart\1.1\m2e-lastUpdated.properties (Access is denied).
> 
> 
> 
> 2.       I tried to create a simple project and then convert to Maven. This is successful but when I try to add dependency for selenium using the Add dependency wizard - I get this error
> 
> "Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:3.12.0

(...)

> Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.seleniumhq.selenium:selenium-java:pom:3.12.0 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

This is the root cause of your problem:
According to your stack trace I assume that you're inside of a corporate network. Do you have to use a proxy to connect to the internet via HTTP(S)? If yes, see [1]

Additionally I assume that your company uses an internal root CA for outgoing SSL traffic, right?

Java uses its own CA trust store (the file "cacerts" in the installation) and unfortunately doesn't use the ones built-in into Windows. The same applies to Firefox if you have it installed...

To let Java applications connect to the outside world via SSL, save this certificate to a file on your hard disc and install it into your Java installation by entering the following command on a command line with administrative privileges:

%> keytool -importcert -keystore cacerts -storepass changeit -alias <choose_alias_name> -file <your_certificate_file>

("changeit" is the default password for the keystore, btw.)

Attention:
If you install a JDK, you normally also have a JRE installed on your machine, and therefore you have the cacerts file twice on your machine:
%JAVA_HOME%\jre\lib\security
%JRE_HOME%\lib\security



[1] http://maven.apache.org/guides/mini/guide-proxies.html


HTH

Thorsten

Re: Maven Project Creation Error

Posted by Martin Gainty <mg...@hotmail.com>.
C:\Users\i716181\.m2\repository\org\apache\maven\archetypes\maven-archetype-quickstart\1.1\m2e-lastUpdated.properties (Access is denied)

MG>if you uncheck read-only attribute for m2e-lastUpdated.properties?



Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:3.12.0


  1.  <repositories>
  2.  <repository>
  3.  <id>repo1</id>
  4.  <name>repo1</name>
  5.  <url>http://repo1.maven.org</url>
  6.  </repository>

MG>and if you specify accessible repository such as repo1 in
${user.home}/.m2/settings.xml
so now maven can reference:org.seleniumhq.selenium:selenium-java:jar:3.12.0 ?

MG>see below
______________________________________________



________________________________
From: Bhattacharjee, V. (Vani) <Va...@voya.com>
Sent: Saturday, May 12, 2018 5:37 AM
To: users@maven.apache.org
Subject: Maven Project Creation Error

Hi ,

I am kind of new to Maven.

I have following JDK and Maven version


C:\Users\iXXXXXX>java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) Client VM (build 25.171-b11, mixed mode)

C:\Users\iXXXXXX>mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T14:49:0
5-05:00)
Maven home: C:\Users\iXXXXXX\Documents\apache-maven-3.5.3\bin\..
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.8.0_171\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

I have also set the Environment variables - JAVA_HOME, M2_HOME and edited the path variable to both the bin folders.

I am trying to create a new Maven Project in Eclipse in two ways but not successful


1.       I am getting following error when I try to  create from File --> New --> Maven Project --> Entering Group Id and Artifact Id --> Finish.

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
Could not write artifact lastUpdated status
C:\Users\i716181\.m2\repository\org\apache\maven\archetypes\maven-archetype-quickstart\1.1\m2e-lastUpdated.properties (Access is denied).



2.       I tried to create a simple project and then convert to Maven. This is successful but when I try to add dependency for selenium using the Add dependency wizard - I get this error

"Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:3.12.0

org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:3.12.0
                at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
                at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
                at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
                at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
                at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:172)
                at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:215)
                at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:188)
                at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:119)
                at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProject(MavenImpl.java:636)
                at org.eclipse.m2e.core.internal.project.registry.DefaultMavenDependencyResolver.resolveProjectDependencies(DefaultMavenDependencyResolver.java:63)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refreshPhase2(ProjectRegistryManager.java:530)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:492)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:1)
                at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
                at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:496)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:351)
                at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:298)
                at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:154)
                at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:89)
                at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
                at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
                at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
                at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
                at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
                at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
                at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
                at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
                at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
                at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
                at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
                at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
                at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
                at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
                at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)
                at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232)
                at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.seleniumhq.selenium:selenium-java:pom:3.12.0 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
                at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
                at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
                at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
                at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
                ... 41 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.seleniumhq.selenium:selenium-java:pom:3.12.0 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

MG>https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html
Unable to Connect to SSL Services due to PKIX Path ...<https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html>
confluence.atlassian.com
Atlassian Support; Documentation; Atlassian Knowledge Base; SSL/TLS Troubleshooting; Unable to Connect to SSL Services due to PKIX Path Building Failed


MG>$JAVA_HOME/bin/java SSLPoke repo.maven.org 443
MG>if SSLPoke fails the certificate your client provided was never imported to your truststore
MG>if you cannot use alternate repository such as repo1 specified above

MG>then you will need to import client provided cert to your truststore
MG>make sure you specify valid cert.alias you will remember
MG>make sure you specify valid cert.file location
MG>make sure you specifty valid keystore.jks that accompanied cert embedded in supplied pfx
MG>make sure you specify valid keystore.pass for supplied keysrore.jks

keytool -import -noprompt -trustcacerts -alias ${cert.alias} -file
${cert.file} -keystore ${keystore.file} -storepass ${keystore.pass}

MG>https://docs.oracle.com/cd/E19830-01/819-4712/ablqw/index.html

Working with Certificates and SSL (Sun Java System ...<https://docs.oracle.com/cd/E19830-01/819-4712/ablqw/index.html>
docs.oracle.com
Installation of the Application Server generates a digital certificate in JSSE (Java Secure Socket Extension) format suitable for internal testing. By default, the Application Server stores its certificate information in two files in the domain-dir/config directory: Each keystore entry has a unique ...




                at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:904)
                at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
                at io.takari.aether.connector.AetherRepositoryConnector$GetTask.flush(AetherRepositoryConnector.java:678)
                at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:310)
                at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
                at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
                ... 44 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
                at sun.security.ssl.Alerts.getSSLException(Unknown Source)
                at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
                at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
                at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
                at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
                at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
                at sun.security.ssl.Handshaker.processLoop(Unknown Source)
                at sun.security.ssl.Handshaker.process_record(Unknown Source)
                at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
                at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
                at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
                at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
                at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:268)
                at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:238)
                at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:149)
                at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:192)
                at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
                at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
                at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
                at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
                at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
                at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
                at okhttp3.RealCall.execute(RealCall.java:69)
                at io.takari.aether.okhttp.OkHttpAetherClient.execute(OkHttpAetherClient.java:207)
                at io.takari.aether.okhttp.OkHttpAetherClient.get(OkHttpAetherClient.java:153)
                at io.takari.aether.connector.AetherRepositoryConnector$GetTask.getResponse(AetherRepositoryConnector.java:672)
                at io.takari.aether.connector.AetherRepositoryConnector$GetTask.resumableGet(AetherRepositoryConnector.java:587)
                at io.takari.aether.connector.AetherRepositoryConnector$GetTask.run(AetherRepositoryConnector.java:453)
                at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:304)
                ... 46 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
                at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
                at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
                at sun.security.validator.Validator.validate(Unknown Source)
                at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
                at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
                at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
                ... 79 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
                at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
                at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
                at java.security.cert.CertPathBuilder.build(Unknown Source)
                ... 85 more"


Thanks and Regards,
Vani
--------------------------------------------------------- NOTICE: The information contained in this electronic mail message is confidential and intended only for certain recipients. If you are not an intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication and any attachments is strictly prohibited. If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it. ============================================================================================