Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala 欺骗节俭的错误_Scala_Thrift_Finagle - Fatal编程技术网

Scala 欺骗节俭的错误

Scala 欺骗节俭的错误,scala,thrift,finagle,Scala,Thrift,Finagle,我使用欺骗节约,但当我构建服务器和服务时 val service = new EchoService$FinagleService(new EchoServiceImpl, new TBinaryProtocol.Factory()) val server = Thrift.server.serveIface("localhost:8080", service) 我在收到异常时运行它: Exception in thread "main" java.lang.NoSuchMethod

我使用欺骗节约,但当我构建服务器和服务时

  val service = new EchoService$FinagleService(new EchoServiceImpl, new TBinaryProtocol.Factory())

  val server = Thrift.server.serveIface("localhost:8080", service)
我在收到异常时运行它:

Exception in thread "main" java.lang.NoSuchMethodError: com.twitter.finagle.server.StackServer.$init$(Lcom/twitter/finagle/server/StackServer;)V
    at com.twitter.finagle.Thrift$Server.<init>(Thrift.scala:417)
Disconnected from the target VM, address: '127.0.0.1:60647', transport: 'socket'
    at com.twitter.finagle.Thrift$.server(Thrift.scala:495)
线程“main”java.lang.NoSuchMethodError中的异常:com.twitter.finagle.server.StackServer.$init$(Lcom/twitter/finagle/server/StackServer;)V 在com.twitter.finagle.Thrift$服务器上。(Thrift.scala:417) 已断开与目标VM的连接,地址:'127.0.0.1:60647',传输:'socket' 在com.twitter.finagle.Thrift$.server上(Thrift.scala:495)
我想你应该

val service = new EchoService$FinagleService(new EchoServiceImpl, new TBinaryProtocol.Factory())
val server = Thrift.server.serve("localhost:8080", service)

但我不认为这可以解决NoSuchMethodError,这似乎是一个版本兼容性问题。我会首先检查欺骗版本和史克鲁奇版本,确保它们在同一页上

val server = Thrift.server.serveIface("localhost:8080", EchoServiceImpl)