我试图定义一个finch post端点,为了简化目的,我使用了stringBody, 端点定义如下:
val e =“product”::“v1”::“createBody”:: stringBody
当我尝试启动该服务时,得到了以下问题:
Exception in thread "main" java.lang.AbstractMethodError: com.twitter.finagle.stats.MetricsStatsReceiver.com$twitter$finagle$stats$StatsReceiverWithCumulativeGauges$setter$com$twitter$finagle$stats$StatsReceiverWithCumulativeGauges$$gaugeFn_$eq(Ljava/util/function/Function;)V
at com.twitter.finagle.stats.StatsReceiverWithCumulativeGauges$class.$init$(CumulativeGauge.scala:133)
at com.twitter.finagle.stats.MetricsStatsReceiver.(MetricsStatsReceiver.scala:175)
at com.twitter.finagle.stats.MetricsStatsReceiver.(MetricsStatsReceiver.scala:179)
at com.twitter.finagle.stats.MetricsStatsReceiver.(MetricsStatsReceiver.scala:180)
at com.twitter.finagle.stats.MetricsStatsReceiver.(MetricsStatsReceiver.scala:181)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at com.twitter.app.LoadService$$anonfun$5.apply(LoadService.scala:74)
at com.twitter.app.LoadService$$anonfun$5.apply(LoadService.scala:63)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241)
at scala.collection.AbstractTraversable.flatMap(Traversable.scala:104)
at com.twitter.app.LoadService$.apply(LoadService.scala:63)
at com.twitter.finagle.util.LoadService$.apply(LoadService.scala:14)
at com.twitter.finagle.stats.LoadedStatsReceiver$.(LoadedStatsReceiver.scala:18)
at com.twitter.finagle.stats.LoadedStatsReceiver$.(LoadedStatsReceiver.scala)
at com.twitter.finagle.stats.FinagleStatsReceiver$.(LoadedStatsReceiver.scala:37)
at com.twitter.finagle.stats.FinagleStatsReceiver$.(LoadedStatsReceiver.scala)
at com.twitter.finagle.util.HashedWheelTimer$.(HashedWheelTimer.scala:158)
at com.twitter.finagle.util.HashedWheelTimer$.(HashedWheelTimer.scala)
at com.twitter.finagle.util.DefaultTimer$.(HashedWheelTimer.scala:170)
at com.twitter.finagle.util.DefaultTimer$.(HashedWheelTimer.scala)
at com.twitter.finagle.stats.JsonExporter.(JsonExporter.scala:65)
at com.twitter.finagle.stats.MetricsExporter.(MetricsStatsReceiver.scala:334)
at com.twitter.finagle.stats.MetricsExporter.(MetricsStatsReceiver.scala:338)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at com.twitter.app.LoadService$$anonfun$5.apply(LoadService.scala:74)
at com.twitter.app.LoadService$$anonfun$5.apply(LoadService.scala:63)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241)
at scala.collection.AbstractTraversable.flatMap(Traversable.scala:104)
at com.twitter.app.LoadService$.apply(LoadService.scala:63)
at com.twitter.finagle.util.LoadService$.apply(LoadService.scala:14)
at com.twitter.finagle.http.HttpMuxer$.(HttpMuxer.scala:122)
at com.twitter.finagle.http.HttpMuxer$.(HttpMuxer.scala)
at com.twitter.server.Lifecycle$class.$init$(Lifecycle.scala:12)
at com.shichen.trail.finch.HelloFinch$.(HelloFinch.scala:22)
at com.shichen.trail.finch.HelloFinch$.(HelloFinch.scala)
at com.shichen.trail.finch.HelloFinch.main(HelloFinch.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
我在这里想念的是什么?
感谢。