报错信息如下

 Error:scalac: bad symbolic reference. A signature in package.class refers to type compileTimeOnly
    in package scala.annotation which is not available.
    It may be completely missing from the current classpath, or the version on

    the classpath might be incompatible with the version used when compiling package.class.

原因是spark和scala的版本不匹配造成的.
自己查询maven仓库添加对应版本的scala依赖
比如我使用的spark版本是2.2.0
scala版本是2.10.*
scala报错``

<!-- https://mvnrepository.com/artifact/org.apache.spark/spark-core -->
<dependency>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-core_2.10</artifactId>
    <version>2.2.0</version>
</dependency>

相关文章:

  • 2021-11-20
  • 2021-05-06
  • 2021-07-12
  • 2021-10-13
  • 2021-04-14
  • 2021-07-12
  • 2021-09-16
  • 2022-12-23
猜你喜欢
  • 2021-04-19
  • 2022-12-23
  • 2021-08-30
  • 2021-11-10
  • 2021-05-19
  • 2021-11-25
  • 2021-04-18
相关资源
相似解决方案