我嘗試用火花SQL工作,但我有以下錯誤:星火SQL錯誤
error: missing or invalid dependency detected while loading class file 'package.class'. Could not access term annotation in package org.apache.spark, because it (or its dependencies) are missing. Check your build definition for missing or conflicting dependencies. (Re-run with
-Ylog-classpath
to see the problematic classpath.) A full rebuild may help if 'package.class' was compiled against an incompatible version of org.apache.spark. warning: Class org.apache.spark.annotation.InterfaceStability not found - continuing with a stub. error: missing or invalid dependency detected while loading class file 'SparkSession.class'. Could not access term annotation in package org.apache.spark, because it (or its dependencies) are missing. Check your build definition for missing or conflicting dependencies. (Re-run with-Ylog-classpath
to see the problematic classpath.) A full rebuild may help if 'SparkSession.class' was compiled against an incompatible version of org.apache.spark.
我的配置:
- 斯卡拉2.11.8
- 火花core_2.11 -2.1.0
火花sql_2.11-2.1.0
注意:我使用SparkSession。
你能分享你是怎麼解決這個問題? –
@YashSharma,我JUSTE使用SBT工具並投入build.sbt:libraryDependencies ++ = SEQ( \t 「org.apache.spark」 %% 「火花芯」 % 「2.1.0」 % 「提供」, \t「org.apache.spark」%%「spark-sql」%「2.1.0」%「provided」) –