1

I am going through https://www.squeryl.org/download.html to figure out how to import Squeryl using SBT. There it is written to add just one line libraryDependencies += "org.squeryl" %% "squeryl" % "0.9.5-6" in the build.sbt. However, when I add that same line in the file and then run sbt run on the terminal, I get thrown an error sbt.librarymanagement.ResolveException: Error downloading org.squeryl:squeryl_2.13:0.9.5-6. I searched in Google for that error but it looks like no one else has ever had that issue before. Can someone please help me out with what can be done to resolve the issue?

The full error is pasted below in case it helps:

$ sbt run
[info] Loading settings for project taxonomy-build from plugins.sbt ...
[info] Loading project definition from /Users/s1b01g3/durden-temp/durden/services/taxonomy/project
[info] Loading settings for project root from build.sbt ...
[info] Set current project to taxonomy (in build file:/Users/s1b01g3/durden-temp/durden/services/taxonomy/)
[info] Updating 
[info] Resolved  dependencies
[warn] 
[warn]  Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading org.squeryl:squeryl_2.13:0.9.5-6
[error]   Not found
[error]   Not found
[error]   not found: /Users/s1b01g3/.ivy2/local/org.squeryl/squeryl_2.13/0.9.5-6/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/org/squeryl/squeryl_2.13/0.9.5-6/squeryl_2.13-0.9.5-6.pom
[error]     at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:245)
[error]     at lmcoursier.CoursierDependencyResolution.$anonfun$update$34(CoursierDependencyResolution.scala:214)
[error]     at scala.util.Either$LeftProjection.map(Either.scala:573)
[error]     at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:214)
[error]     at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error]     at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:52)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:102)
[error]     at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:69)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:115)
[error]     at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:115)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:96)
[error]     at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:150)
[error]     at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:129)
[error]     at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:2946)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]     at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error]     at sbt.Execute.work(Execute.scala:290)
[error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[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:1149)
[error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]     at java.lang.Thread.run(Thread.java:748)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading org.squeryl:squeryl_2.13:0.9.5-6
[error]   Not found
[error]   Not found
[error]   not found: /Users/s1b01g3/.ivy2/local/org.squeryl/squeryl_2.13/0.9.5-6/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/org/squeryl/squeryl_2.13/0.9.5-6/squeryl_2.13-0.9.5-6.pom
[error] Total time: 3 s, completed 17 Jan, 2020 4:19:54 PM

Any kind of help whatsoever would be highly appreciated. Thanks a lot.

Sanjiban Bairagya
  • 704
  • 2
  • 12
  • 33

1 Answers1

1

The problem is that squeryl 0.9.5-6 was never released for Scala 2.13.

In such a case, just have a look at mvnrepository.com, searching for your artifact:

https://mvnrepository.com/artifact/org.squeryl/squeryl

The table tells you which version was published for Scala 2.13: 0.9.14

cbley
  • 4,538
  • 1
  • 17
  • 32
  • Thanks @cbley, that works. However, sorry for reopening this thread but what if now I want to use a different pair of Squeryl and Scala versions? Do I just change scalaVersion value to "2.11" and the version of squeryl to "0.9.12" in build.sbt? Because I tried the same and it still throws me the same error sbt.librarymanagement.ResolveException even though those versions are compatible as per the mvnrepository link. I'm pasting the content of my build.sbt file, and the output of sbt compile below for convenience: https://paste.ubuntu.com/p/T8FMHNHYgt/ https://paste.ubuntu.com/p/tk63MWZSCk/ – Sanjiban Bairagya Jan 29 '20 at 12:10
  • There is no Scala version "2.11". You need to use full version numbers for the `scalaVersion` setting. SBT will convert that to a *binary* version number which it uses to resolve dependencies. – cbley Jan 29 '20 at 12:35
  • Plus, Play 2.8 does not exist for 2.11.x as they dropped it, see https://www.playframework.com/documentation/2.8.x/Migration28#Scala-2.11-support-discontinued – cbley Jan 29 '20 at 12:41
  • Another note: squeryl 0.9.14 is cross published for Scala 2.10.x, 2.11.x, 2.12.x and 2.13.x. So you can (and should) always use the latest version. – cbley Jan 29 '20 at 12:44
  • Yeah, sorry, I meant, 2.11.11. Still getting same error: https://paste.ubuntu.com/p/CC3pbVxgfn/ – Sanjiban Bairagya Jan 29 '20 at 12:44
  • 1
    See https://mvnrepository.com/artifact/com.typesafe.play/play -- Play is only published for 2.12.x and 2.13.x. – cbley Jan 29 '20 at 12:46
  • I agree that we should use the latest version all the time. Which is why initially I had been trying to get it to work with latest versions for both. However, some dinosaurs in our org for some reason asked me to use the same version that is used by other teams, which is why I'm having to unwillingly use the older versions. – Sanjiban Bairagya Jan 29 '20 at 12:47
  • I rechecked that link, and it looks like we can indeed use Play 2.7.x with Scala 2.11.x. Would you happen to know how to set up with that configuration? That is, Scala 2.11.11, Play 2.7.4, Squeryl 0.9.12? – Sanjiban Bairagya Jan 30 '20 at 05:11
  • Yeah, downgrading Play to 2.7.4 should work, if you are bound to Scala 2.11.x. Just set `scalaVersion := "2.11.11"` (you know there is 2.11.12, right?), use `addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.4")` in `project/plugins.sbt` and use `libraryDependencies += "org.squeryl" %% "squeryl" % "0.9.12"`. – cbley Jan 30 '20 at 08:00