sbt/sbt-bintray

NoSuchMethodError: dispatch.Http$.$lessinit$greater$default$1()

Closed this issue · 6 comments

I'm unexpectedly getting the below stack trace when running sbt on my project. I don't think anything has changed since the last time I worked on this particular project, so I wonder if bintray-sbt has changed somehow. I tried wiping my ~/.ivy2 with no luck.

Here's my configuration:

build.sbt:

scalaVersion  := "2.10.5"

project/plugins.sbt:

addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")

project/build.properties:

sbt.version=0.13.8

And here's the stack trace:

java.lang.NoSuchMethodError: dispatch.Http$.$lessinit$greater$default$1()Lcom/ning/http/client/AsyncHttpClient;
        at bintray.BintrayRepo.<init>(BintrayRepo.scala:12)
        at bintray.Bintray$$anonfun$cachedRepo$1.apply(Bintray.scala:56)
        at bintray.Bintray$$anonfun$cachedRepo$1.apply(Bintray.scala:56)
        at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:189)
        at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:632)
        at bintray.Bintray$.cachedRepo(Bintray.scala:56)
        at bintray.Bintray$$anonfun$withRepo$1.apply(Bintray.scala:50)
        at bintray.Bintray$$anonfun$withRepo$1.apply(Bintray.scala:49)
        at scala.Option.map(Option.scala:145)
        at bintray.Bintray$.withRepo(Bintray.scala:49)
        at bintray.BintrayPlugin$$anonfun$publishToBintray$1.apply(BintrayPlugin.scala:180)
        at bintray.BintrayPlugin$$anonfun$publishToBintray$1.apply(BintrayPlugin.scala:175)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.EvaluateSettings$MixedNode.evaluate0(INode.scala:175)
        at sbt.EvaluateSettings$INode.evaluate(INode.scala:135)
        at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$submitEvaluate$1.apply$mcV$sp(INode.scala:69)
        at sbt.EvaluateSettings.sbt$EvaluateSettings$$run0(INode.scala:78)
        at sbt.EvaluateSettings$$anon$3.run(INode.scala:74)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Note: My sbt launcher is 0.13.9.

Tried again with 0.13.8, and see the same issue.

Could it be this change? sbt/bintry@046794f#diff-fdc3abdfd754eeb24090dbd90aeec2ce

It seems strange that I wouldn't have run into this sooner.

I'm seeing this now on a new project I'm trying to publish. Existing projects don't encounter it, so it seems to be related to having a brand-new (i.e. empty) Bintray repo.

Using Scala 2.11.7, SBT 0.13.8, Bintray plugin 0.3.0

... and even happens if I roll back to Bintray plugin 0.1.2.

Had the same issue, in my case it was due to the conflicting dependencies, for some reason having: addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8") was an issue. Commenting it out helped

2m commented

The original issue seems to be an incompatibility between sbt-pgp plugin versions. Not much we can do here.

Thanks @4lex1v for mentioning a workaround.