Apache Spark Exception in thread “main” java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class

前端 未结 2 1428
南方客
南方客 2021-01-18 08:31

Scala version:2.11.7(had to upgrade the scala verison to enable case clasess to accept more than 22 parameters.) Spark version:1.6.1 PFB pom.xml

Getting below error

2条回答
  •  温柔的废话
    2021-01-18 08:48

    In the POM you have Scala version 2.11.7 but later on in the dependencies you are declaring Spark deps compiled against 2.10:

    spark-streaming_2.10
    spark-core_2.10
    spark-sql_2.10
    

    You have to change it to:

    spark-streaming_2.11
    spark-core_2.11
    spark-sql_2.11
    

提交回复
热议问题