Search code examples
javaplayframeworksbt

Cannot get sbt-plugin nor sbt-play-ebean to work with Play 2.8.0 and sbt 1.5.5


Getting back into the Play Framework after a three-year hiatus and trying to start with the latest Play (2.8.0) and sbt (1.5.5).

I am trying to get a project running and receive this message:

[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

In my plugins.sbt file, I have:

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")

In my build.sbt file, I have:

scalaVersion := "2.13.6"

Running:

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

I am guessing there is a version conflict, but not sure how to fix. I found other posts, but they did not get me the answer: Unresolved Dependencies sbt with play framework

Play! Framework and SBT - Problems with ebeans module

SBT. Resolving dependencies for play sbt-plugin

Unresolved dependency sbt-play-ebean

sbt can not find the ebean dependency (Some unresolved dependencies have extra attributes)

How to add Play Ebean in Play project?

Should I be using just sbt 1.0 and scala 2.12 as it says in the error message?

Appreciate the help - looking forward to getting back into Play.

------------------ EDIT 8/2/2021 - focused on ivy.xml:

As of now, I have the .ivy2 folder, but there are no folders inside that folder - only a file called .sbt.ivy.lock. I tried this URL from the error above and it let me download a file: 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

I tried manually creating the folder structure listed in the error:

C:\Users\dzell\.ivy2\localcom.typesafe.play\sbt-plugin\scala_2.12\sbt_1.0\2.8.0\ivys\ivy.xml

I placed the downloaded file in that folder above, but it did not fix the error.

------------------ EDIT 7/29/2021 - adding the full error:

[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

Solution

  • After looking at the Java/JRE/JDK installation, I noticed that there was no cacerts file. I uninstalled the Java/JRE/JDK - making sure all references/folders/files were removed.

    I created an Oracle account to download the install files from Oracle's site, since the OpenJDK was giving me issues.

    I downloaded and installed the Java/JRE file jre-8u301-windows-x64.exe first. I made sure Java was installed by using the java -version in a command prompt. I was good to go.

    I then downloaded and installed the JDK file jdk-8u301-windows-x64.exe. I made sure Java was installed by using the javac -version in a command prompt. I was good to go.

    I started up sbt and had no problems - it was fixed.