NoSuchMethodError when declaring a variable

前端 未结 1 343
半阙折子戏
半阙折子戏 2021-01-13 02:28

I\'m running into a weird error when using Spark and Scala. I have a piece of code that declares a variable:

var offset = 0

This causes the

相关标签:
1条回答
  • 2021-01-13 02:56

    This is almost certainly a scala version mismatch. Comparing the definition of IntRef in v2.10 and v2.11, you can see that create was only introduced in the latter version (see https://github.com/scala/scala/blob/v2.10.4/src/library/scala/runtime/IntRef.java and https://github.com/scala/scala/blob/v2.11.0/src/library/scala/runtime/IntRef.java). You can bet that some of your dependencies was compiled against a scala version < 2.11.0. You might want to try sbt-dependency-graph (https://github.com/jrudolph/sbt-dependency-graph) to check your transitive dependencies.

    0 讨论(0)
提交回复
热议问题