在中断三年之后重新进入Play框架,并尝试从最新的Play(2.8.0)和sbt(1.5.5)开始。
我正在尝试让一个项目运行并收到此消息:
[info] welcome to sbt 1.5.5 (Oracle Corporation Java 1.8.0_41)
[info] loading settings for project global-plugins from plugins.sbt ...
[info] loading global plugins from C:Usersdzell.sbt1.0plugins
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.typesafe.play:sbt-plugin:2.8.0 (sbtVersion=1.0, scalaVersion=2.12)
[warn] com.typesafe.sbt:sbt-play-ebean:4.0.6 (sbtVersion=1.0, scalaVersion=2.12)
[warn]
[warn] Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.play:sbt-plugin;sbtVersion=1.0;scalaVersion=2.12:2.8.0
在我的plugins.sbt
文件中,我有:
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "4.0.6")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
在我的build.sbt
文件中,我有:
scalaVersion := "2.13.6"
运行:
C:Usersdzell>java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) Client VM (build 25.301-b09, mixed mode, sharing)
C:Usersdzell>javac -version
javac 1.8.0_41
我猜有一个版本冲突,但不知道如何修复。我找到了其他帖子,但他们没有给我答案:未解决的依赖项sbt with play framework
玩!框架和SBT - ebeans模块的问题
SBT。解析sbt-plugin的依赖
未解析的依赖项sbt-play-ebean
sbt无法找到ebean依赖项(一些未解析的依赖项有额外的属性)
如何在Play项目中添加Play Ebean ?
我应该只使用sbt 1.0和scala 2.12,因为它在错误信息中说?
感谢您的帮助-期待重新进入游戏。
------------------ 编辑8/2/2021 -专注于流:
到目前为止,我有.ivy2
文件夹,但该文件夹内没有文件夹-只有一个名为.sbt.ivy.lock
的文件。我从上面的错误中尝试了这个URL,它让我下载了一个文件:https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.8.0/ivys/ivy.xml
我尝试手动创建错误中列出的文件夹结构:
C:Usersdzell.ivy2localcom.typesafe.playsbt-pluginscala_2.12sbt_1.02.8.0ivysivy.xml
我把下载的文件放在上面的文件夹中,但是它并没有修复错误。
------------------ 编辑7/29/2021——添加完整的错误:
[warn] Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.play:sbt-plugin;sbtVersion=1.0;scalaVersion=2.12:2.8.0
[error] Not found
[error] Not found
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo1.maven.org/maven2/com/typesafe/play/sbt-plugin_2.12_1.0/2.8.0/sbt-plugin-2.8.0.pom
[error] not found: C:Usersdzell.ivy2localcom.typesafe.playsbt-pluginscala_2.12sbt_1.02.8.0ivysivy.xml
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.8.0/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.8.0/ivys/ivy.xml
[error] Error downloading com.typesafe.sbt:sbt-play-ebean;sbtVersion=1.0;scalaVersion=2.12:4.0.6
[error] Not found
[error] Not found
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-play-ebean_2.12_1.0/4.0.6/sbt-play-ebean-4.0.6.pom
[error] not found: C:Usersdzell.ivy2localcom.typesafe.sbtsbt-play-ebeanscala_2.12sbt_1.04.0.6ivysivy.xml
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-play-ebean/scala_2.12/sbt_1.0/4.0.6/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-play-ebean/scala_2.12/sbt_1.0/4.0.6/ivys/ivy.xm
[error] at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:258)
[error] at lmcoursier.CoursierDependencyResolution.$anonfun$update$38(CoursierDependencyResolution.scala:227)
[error] at lmcoursier.CoursierDependencyResolution$$Lambda$4028/4493266.apply(Unknown Source)
[error] at scala.util.Either$LeftProjection.map(Either.scala:573)
[error] at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:227)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:59)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:133)
[error] at sbt.internal.LibraryManagement$$$Lambda$3204/9760435.apply(Unknown Source)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:73)
[error] at sbt.util.Tracked$$$Lambda$3122/23600241.apply(Unknown Source)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:146)
[error] at sbt.internal.LibraryManagement$$$Lambda$3206/1799764.apply(Unknown Source)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:146)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:127)
[error] at sbt.internal.LibraryManagement$$$Lambda$3200/19618076.apply(Unknown Source)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.util.Tracked$$$Lambda$2944/32581439.apply(Unknown Source)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:160)
[error] at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3678)
[error] at sbt.Classpaths$$$Lambda$544/6222801.apply(Unknown Source)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at scala.Function1$$Lambda$313/9144307.apply(Unknown Source)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.internal.util.$tilde$greater$$Lambda$2811/14105697.apply(Unknown Source)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.Execute$$Lambda$2843/26297029.apply(Unknown Source)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.Execute$$Lambda$2821/15687584.apply(Unknown Source)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.ConcurrentRestrictions$$anon$4$$Lambda$2834/23267753.apply(Unknown Source)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] at java.lang.Thread.run(Thread.java:745)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.play:sbt-plugin;sbtVersion=1.0;scalaVersion=2.12:2.8.0
[error] Not found
[error] Not found
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo1.maven.org/maven2/com/typesafe/play/sbt-plugin_2.12_1.0/2.8.0/sbt-plugin-2.8.0.pom
[error] not found: C:Usersdzell.ivy2localcom.typesafe.playsbt-pluginscala_2.12sbt_1.02.8.0ivysivy.xml
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.8.0/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.8.0/ivys/ivy.xml
[error] Error downloading com.typesafe.sbt:sbt-play-ebean;sbtVersion=1.0;scalaVersion=2.12:4.0.6
[error] Not found
[error] Not found
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-play-ebean_2.12_1.0/4.0.6/sbt-play-ebean-4.0.6.pom
[error] not found: C:Usersdzell.ivy2localcom.typesafe.sbtsbt-play-ebeanscala_2.12sbt_1.04.0.6ivysivy.xml
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-play-ebean/scala_2.12/sbt_1.0/4.0.6/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty (java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty) while downloading https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-play-ebean/scala_2.12/sbt_1.0/4.0.6/ivys/ivy.xml
查看Java/JRE/JDK安装后,我注意到没有cacerts
文件。我卸载了Java/JRE/JDK——确保所有的引用/文件夹/文件都被删除了。
我创建了一个Oracle帐户从Oracle的网站下载安装文件,因为OpenJDK给了我问题。
我先下载并安装了Java/JRE文件jre-8u301-windows-x64.exe
。我通过在命令提示符中使用java -version
来确保安装了Java。我准备好了。
然后我下载并安装了JDK文件jdk-8u301-windows-x64.exe
。我通过在命令提示符中使用javac -version
来确保安装了Java。我准备好了。
我启动了sbt,没有任何问题-它被修复了。