question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoSuchMethodError with Coursier 1.0.2 and SBT 0.13.16 in sbt.librarymanagement.package$.CrossVersion

See original GitHub issue

When trying to use Coursier 1.0.2 with SBT 0.13.16, I encountered the following NoSuchMethodError:

java.lang.NoSuchMethodError: sbt.librarymanagement.package$.CrossVersion()Lsbt/CrossVersion$;
	at coursier.FromSbt$.sbtCrossVersionName(FromSbt.scala:30)
	at coursier.FromSbt$.sbtModuleIdName(FromSbt.scala:22)
	at coursier.FromSbt$.moduleVersion(FromSbt.scala:46)
	at coursier.FromSbt$.dependencies(FromSbt.scala:62)
	at coursier.FromSbt$$anonfun$8.apply(FromSbt.scala:141)
	at coursier.FromSbt$$anonfun$8.apply(FromSbt.scala:141)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
	at coursier.FromSbt$.project(FromSbt.scala:141)
	at coursier.Tasks$$anonfun$coursierProjectTask$1$$anonfun$apply$13.apply(Tasks.scala:204)
	at coursier.Tasks$$anonfun$coursierProjectTask$1$$anonfun$apply$13.apply(Tasks.scala:198)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

This problem does not occur with Coursier 1.0.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

19reactions
alexarchambaultcommented, Mar 2, 2018

If I add the following to ~/.sbt/0.13/plugins/plugins.sbt, it seems to be ok

addSbtPlugin("com.dwijnand" % "sbt-compat" % "1.2.6")
addSbtPlugin("org.ensime" % "sbt-ensime" % "2.1.0")

(and the order seems to matter 😐 )

This basically bumps sbt-compat to the version used by sbt-coursier.

5reactions
therealpxccommented, Mar 1, 2018

@alexarchambault @gcnew sbt-ensime (v2.1.0) is the only SBT plugin I have globally enabled.

I don’t much want to disable, it, though, since ENSIME + Emacs is how I’ve learned to do Scala 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

sbt-coursier
Note that in the first case, you may want to consider migrating to the sbt librarymanagement API, by using the dependencyResolution sbt key...
Read more >
9 - Stack Overflow
As the release notes mention, Scala.js 0.6.20 requires sbt 0.13.16 or above. To achieve this, the project/build.properties file should be ...
Read more >
sbt Reference Manual — Combined Pages
Follow Install page, and install Scala using Coursier. ... Beginning in sbt 0.13.16, using batch mode in sbt will issue an informational startup...
Read more >
sbt Reference Manual - Manualzz
Running sbt with no command line arguments starts sbt shell. sbt shell has a command prompt (with tab completion and history!). For example,...
Read more >
sbt/sbt - Gitter
also where is crossSbtVersions := Seq("1.0.0", "0.13.16") documented ... value copy is not a member of sbt.librarymanagement.Artifact [error] artifact in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found