Search code examples
javascalamaventwitterfinagle

Which of the listed .jar contains class 'com.twitter.finagle.stats.ExceptionStatsHandler'?


I have to use Finagle 6.35.0 for Scala 2.11 as a dependency.

I made my project dependent on

  1. finagle-core_2.11-6.35.0.jar
  2. finagle-stats_2.11-6.35.0.jar.

Error what I got:
java.lang.ClassNotFoundException: com.twitter.finagle.stats.ExceptionStatsHandler.

I expected this class to be in one of these jars. However none of these jars contains ExceptionStatsHandler which is a little bit surprising for me. I have searched for it in some other finagle .jars like for example finagle-commons-stats_2.11-6.35.0.jar but without success.

Could you tell me in which finagle dependency (.jar) I could find com.twitter.finagle.stats.ExceptionStatsHandler? Maybe it should be in one of previously mentioned ones but I use improper library version?

I am talking about .jars instead of maven or gradle dependencies because my project is a J-boss module and I have to manually add .jars as dependencies.


Solution

  • Searching for your class name we can find :

    Source code: Class ExceptionStatsHandler.scala part of util-stats_2.12 version 18.1.0

    With this information, we can find the according maven dependency : Utilities Stats

    @chrylis also suggests a good way to search for a particular class in the Maven repository :

    To find the jar, go to Central and search for fc:com.twitter.finagle.stats.ExceptionStatsHandler (full classname).