你好,游客 登录
背景:
阅读新闻

Scala错误:Exception in thread “main” java.lang.NoSuchMethodError

[日期:2018-09-15] 来源:csdn  作者: [字体: ]
Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.$scope()Lscala/xml/TopScope$;
    at org.apache.spark.ui.jobs.AllJobsPage.<init>(AllJobsPage.scala:39)
    at org.apache.spark.ui.jobs.JobsTab.<init>(JobsTab.scala:38)
    at org.apache.spark.ui.SparkUI.initialize(SparkUI.scala:67)
    at org.apache.spark.ui.SparkUI.<init>(SparkUI.scala:84)
    at org.apache.spark.ui.SparkUI$.create(SparkUI.scala:221)
    at org.apache.spark.ui.SparkUI$.createLiveUI(SparkUI.scala:163)
    at org.apache.spark.SparkContext.<init>(SparkContext.scala:452)
    at cn.spark.WordCount$.main(WordCount.scala:24)
    at cn.spark.WordCount.main(WordCount.scala)

因为依赖的问题造成的:
在 pom.xml 中配置版本spark-core_2.11

<dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-core_2.11</artifactId>
      <version>${spark.version}</version>
    </dependency>
收藏 推荐 打印 | 阅读: