在运行Finch/Finagle应用程序时,AbstractMethoderror



我正在尝试运行我的应用程序,我会得到此错误:

java.lang.AbstractMethodError: com.twitter.finagle.stats.MetricsStatsReceiver

我的代码是:

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

这可能是一个错误,因此我应该使用哪个版本的库,或者我可以切换到更稳定的Web服务库。

我看到其他人有同样的问题:

https://gist.github.com/edwelker/33E60108D626134680EC13AA265611

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"

正如Alexey在评论中提到的那样,这是一个依赖性不匹配问题。SBT依赖性图是确保所有库都取决于同一版本的有用工具。

相关内容

  • 没有找到相关文章

最新更新