Невозможно создать новый проект Play из-за неразрешенной зависимости - SunCertPathBuilderException: невозможно найти действительную сертификацию - PullRequest
1 голос
/ 12 мая 2019

Я впервые пытаюсь создать новый игровой проект.Я не могу из-за ошибок sun.security.validator.ValidatorException, связанных с https://repo.typesafe.com/*. Как добавить сертификат?

Я установил sbt на Mac и выполнил следующие команды

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, и я не нахожусь за прокси-сервером, который, по-видимому, связан с решениями для аналогичной проблемы.

Спасибо

1 Ответ

1 голос
/ 12 мая 2019

Я использую macOS, sbt 1.2.8, java 1.8.0_45, sbt, недавно установленный с brew.

Я предполагаю, что Java 1.8.0_45 слишком старая. В настоящее время я использую 1.8.0_212. Вы можете получить один из https://adoptopenjdk.net/ или использовать что-то вроде https://sdkman.io/.

...