As a quick note today, if you’re working on a Scala project and get a compiler error message like this:
Caused by: java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)Lscala/collection/mutable/ArrayOps;
that error message may look a lot worse than it is. I stared at it for a little while, and then realized the root cause: I was trying to use a Scala 2.11 library in a Scala 2.12 project. Once I upgraded the library to its 2.12 version, the error message went away.
The key to reading the error message was that it seemed like an almost impossible problem: Getting a java.lang.NoSuchMethodError directly related to a built-in Scala library, specifically scala.Predef$.refArrayOps and scala/collection/mutable/ArrayOps. Since that can’t possibly happen, I realized something else must be the problem.