Reputation: 41858
I am trying to run my application and I get this error:
java.lang.AbstractMethodError: com.twitter.finagle.stats.MetricsStatsReceiver
My code is:
object Main extends TwitterServer {
implicit val objectMapper: ObjectMapper = ObjectProvider.objectMapper
val appConf = ConfigFactory.load()
def main(): Unit = {
statsReceiver.counter("posts")
statsReceiver.counter("login")
// configuration
val port = appConf.getInt("8090")
val db = new CommDb()
val service = Api.makeService(db)
val server = Http.serve(":8080", service) //creates service
def close(): Future[Unit] = {
Await.ready(server.close())
}
Await.ready(server)
}
}
It may be a bug, so what version of the library should I use, or I may just switch to a more stable web service library.
I see others with the same problem:
https://gist.github.com/edwelker/33e60108d62613434680ec13aa265611
Update
"com.github.finagle" %% "finch-core" % "0.14.0",
"com.github.finagle" %% "finch-circe" % "0.14.0",
"com.tokbox" % "opentok-server-sdk" % "3.0.0-beta.2",
"com.google.firebase" % "firebase-server-sdk" % "3.0.1",
"org.scalatest" %% "scalatest" % "2.2.5" % "it,test",
"ch.qos.logback" % "logback-classic" % "1.1.7",
"com.github.finagle" %% "finch-jackson" % "0.14.0",
"com.github.finagle" %% "finch-test" % "0.14.0" % "it,test",
"com.softwaremill.macwire" %% "macros" % "2.2.3" % "provided",
"com.softwaremill.macwire" %% "util" % "2.2.3",
"com.softwaremill.macwire" %% "proxy" % "2.2.3",
"com.twitter" %% "finagle-stats" % "6.35.0",
"com.twitter" %% "twitter-server" % "1.20.0",
"com.twitter" %% "util-eval" % "6.34.0",
"com.typesafe" % "config" % "1.3.0",
"org.slf4j" % "slf4j-api" % "1.7.21",
"org.slf4j" % "jul-to-slf4j" % "1.7.21",
"org.slf4j" % "jcl-over-slf4j" % "1.7.21",
"org.slf4j" % "log4j-over-slf4j" % "1.7.21",
"org.scalactic" %% "scalactic" % "2.2.5" % "it,test",
"org.scalacheck" %% "scalacheck" % "1.13.1" % "it,test",
"ru.arkoit" %% "finchrich-controller" % "0.1.1"
Upvotes: 1
Views: 249
Reputation: 3320
As Alexey mentioned in his comment, this is a dependency mismatch problem. sbt-dependency-graph is a useful tool to make sure all of your libraries are depending on the same version.
Upvotes: 1