【发布时间】:2019-07-26 07:35:44
【问题描述】:
我正在尝试使用 spark 读取 azure 事件中心,但在 intellij 中编译时出现以下错误
Error:scalac: bad symbolic reference to org.apache.http.annotation.Experimental encountered in class file 'EventHubsConf.class'.
Cannot access type Experimental in package org.apache.http.annotation. The current classpath may be
missing a definition for org.apache.http.annotation.Experimental, or EventHubsConf.class may have been compiled against a version that's
incompatible with the one found on the current classpath.
我确保 Intellij 中的编译器指向 SCALA 11.0 库,因为我在 Global SDK 中看到了 scala 12.7 库
以下是我的设置:
name := "xxxxx"
version := "0.1"
scalaVersion := "2.11.0"
libraryDependencies ++= Seq(
// Spark
"org.apache.spark" %% "spark-core" % "2.4.0",
"org.apache.spark" %% "spark-sql" % "2.4.0",
"org.apache.spark" %% "spark-streaming" % "2.4.0",
"com.microsoft.azure" % "azure-eventhubs-spark_2.11" % "2.3.10"
)
感谢任何帮助。
谢谢!
【问题讨论】:
标签: apache-spark intellij-idea azure-eventhub