当前位置: 首页 > 知识库问答 >
问题:

无法让sbt-plugin或sbt-play-ebean与Play 2.8.0和sbt 1.5.5一起使用

弘涛
2023-03-14

在中断三年后回到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:\Users\dzell\.sbt\1.0\plugins
[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

在我的插件.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")

在我的<code>构建中。sbt文件,我有:

scalaVersion := "2.13.6"

跑步:

C:\Users\dzell>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:\Users\dzell>javac -version
javac 1.8.0_41

我猜可能存在版本冲突,但不确定如何修复。我找到了其他帖子,但他们没有给我答案:未解决的依赖性sbt with play framework

玩!框架和 SBT - ebeans 模块的问题

SBT。解析播放 sbt 插件的依赖关系

未解决的依赖sbt-play-ebean

sbt找不到ebean依赖项(一些未解析的依赖项有额外的属性)

如何在Play项目中添加Play Ebean?

我应该像错误消息中所说的那样只使用sbt 1.0和scala 2.12吗?

感谢你的帮助——期待重返赛场。

------------------2021 8月2日编辑-关注ivy.xml:

到目前为止,我有了< code>.ivy2文件夹,但是该文件夹中没有任何文件夹,只有一个名为< code>.sbt.ivy.lock的文件。我从上面的错误中尝试了这个URL,它让我下载了一个文件:https://repo . Scala-SBT . org/Scala SBT/SBT-plugin-releases/com . type safe . play/SBT-plugin/Scala _ 2.12/SBT _ 1.0/2 . 8 . 0/ivys/ivy . XML

我尝试手动创建错误中列出的文件夹结构:

C:\Users\dzell\.ivy2\localcom.typesafe.play\sbt-plugin\scala_2.12\sbt_1.0\2.8.0\ivys\ivy.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:\Users\dzell\.ivy2\localcom.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.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:\Users\dzell\.ivy2\localcom.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.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:\Users\dzell\.ivy2\localcom.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.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:\Users\dzell\.ivy2\localcom.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.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

共有1个答案

隆睿
2023-03-14

在查看了Java/JRE/JDK安装后,我注意到没有cacerts文件。我卸载了Java / JRE / JDK - 确保所有引用/文件夹/文件都被删除。

我创建了一个Oracle帐户来从Oracle的站点下载安装文件,因为OpenJDK给我带来了问题。

我首先下载并安装了Java / JRE文件jre-8u301-windows-x64.exe。我确保 Java 是通过在命令提示符下使用 java 版本安装的。我很好去。

然后我下载并安装了JDK文件jdk-8u301-windows-x64.exe。我确保Java是通过在命令提示符中使用javac-version安装的。我可以走了。

我启动了sbt,没有任何问题——它被修复了。

 类似资料:
  • 这次我的头撞到墙上了。 正在尝试在工作中打开克隆的git SBT项目。它是一个结合了Java和Scala的Play项目,使用Scala 2.11。1,SBT 0.13。6,玩2.5。 我使用IntelliJ从克隆的回购中导入项目,使用JDK 1.8,检查所有下载和SBT复选框,然后运行SBT刷新或从SBT shell重新加载。 完成此操作后,所有SBT和Play代码都将在两个版本上生成。sbt和插

  • 我是新手,并使用SBT构建了一些简单的Scala应用程序/教程。我继续使用Play框架,并使用生成了一个空项目。我做了一些测试,以确保它正确生成。这很好,我添加了sbt-idea插件,,以生成一个IntelliJ项目。这就是地狱破裂的地方。 我必须找到正确的Scala、SBT、Play框架和sbt想法版本组合才能完美编译。否则,编译会出现正确的错误或警告,让我猜测。到目前为止,我拥有的最好的“组合

  • 我正在尝试运行一个简单的play-scala示例,但是我在启动activator时遇到了一些问题,因为我有很多连接超时。我只使用activator创建了应用程序并尝试启动它。没有开发或自定义配置。我用的是Play2.4.2。 它试图解决的许多依赖项似乎并不存在:如果我试图在浏览器中打开url,我只得到“请求路径未找到”。例子如下: 这种行为浪费了很多时间,没有任何价值。是否可以避免不存在的路径或最

  • 我有一个基于android bootstrap的项目。我按照所有步骤使用android studio将google-play-services\u lib添加到项目中。我在工作室制作的作品很棒。当我在手机上安装应用程序时,它会因此错误而死亡 08-02 11:49:26.863 22719-22719/com。唐费尔克。Android引导程序E/AndroidRuntime:致命异常:主java。