gpt4 book ai didi

java - 由于 Unresolved 依赖关系,无法创建新的 Play 项目 - SunCertPathBuilderException : unable to find valid certification

转载 作者:行者123 更新时间:2023-11-30 05:38:52 24 4
gpt4 key购买 nike

我正在尝试第一次创建新的游戏项目。由于与 https://repo.typesafe.com/ 相关的错误 sun.security.validator.ValidatorException 我不能这样做*。如何添加证书?

我在 mac 上安装了 sbt 并运行以下命令

sbt new playframework/play-java-seed.g8
sbt run

实际结果是

:: problems summary ::
:::: ERRORS
Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo.typesafe.com/typesafe/ivy-releases/org.sonatype.oss/oss-parent/9/jars/oss-parent.jar

Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo.typesafe.com/typesafe/ivy-releases/org.apache/apache/18/jars/apache.jar

...

[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn] com.typesafe.play:sbt-plugin:2.7.2 (scalaVersion=2.12, sbtVersion=1.0)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.typesafe.play:sbt-plugin:2.7.2 (scalaVersion=2.12, sbtVersion=1.0) (/Users/dzejn/Documents/Development/PlayTrials/play-samples-play-java-hello-world-tutorial/project/plugins.sbt#L1-2)
[warn] +- default:play-samples-play-java-hello-world-tutorial-build:0.1.0-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: com.typesafe.play#sbt-plugin;2.7.2: Resolution failed several times for dependency: com.typesafe.play#sbt-plugin;2.7.2 {compile=[default(compile)]}::
[error] typesafe-ivy-releases: unable to get resource for com.typesafe.play#sbt-plugin;2.7.2: res=https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.2/ivys/ivy.xml: 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
[error] sbt-plugin-releases: unable to get resource for com.typesafe.play#sbt-plugin;2.7.2: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.2/ivys/ivy.xml: 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
[error]
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] at sbt.internal.librarymanagement.IvyActions$$$Lambda$2480/1497726062.apply(Unknown Source)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)

我使用的是macOS,sbt 1.2.8,java 1.8.0_45,sbt是用brew新安装的。我没有 JAVA_HOME/jre/lib/security/cacerts 目录,并且我不在代理后面,这似乎与针对类似问题提出的解决方案相关。

谢谢

最佳答案

I am using macOS, sbt 1.2.8, java 1.8.0_45, sbt freshly installed with brew.

我的猜测是 Java 1.8.0_45 太旧了。我当前使用的是1.8.0_212。您可以从 https://adoptopenjdk.net/ 获取一个或使用类似 https://sdkman.io/ 的内容.

关于java - 由于 Unresolved 依赖关系,无法创建新的 Play 项目 - SunCertPathBuilderException : unable to find valid certification,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56094476/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com