Why do Scala 2.11 and Spark with scallop lead to “java.lang.NoSuchMethodError: scala.reflect.api.JavaUniverse.runtimeMirror”?

前端 未结 2 774
死守一世寂寞
死守一世寂寞 2021-01-11 10:46

I am using Scala 2.11, Spark, and Scallop (https://github.com/scallop/scallop). I used sbt to build an application fat jar without Spark provided dependencies (this is at: <

2条回答
  •  无人及你
    2021-01-11 11:20

    The issue is that you've used incompatible Scala versions, i.e. Spark was compiled with Scala 2.10 and you were trying to use Scala 2.11.

    Move everything to Scala 2.10 version and make sure you update your SBT as well.

    You may also try to compile Spark sources for Scala 2.11.7 and use it instead.

提交回复
热议问题