Corey
Corey

Reputation: 1059

Scala - What is this NoSuchMethodError telling me?

I get a NoSuchMethodError when I run my unit test. My Scala code compiles, so why does it fail to find a method during runtime?

java.lang.NoSuchMethodError: com.twitter.algebird.Analytics$.mean(Lscala/Function2;)Lscala/Function1;

What does the (Lscala/Function2;) and Lscala/Function1; mean?

Upvotes: 0

Views: 288

Answers (1)

0__
0__

Reputation: 67310

This usually indicates that you are using a binary incompatible library, e.g. your dependencies don't match (you have library A version X and library B that assumes library A version Y).

If you build with sbt, you can run sbt evicted that will give you warnings about possibly incompatible libraries.

Upvotes: 1

Related Questions