2016-12-03 23 views
0

最新Apache Spark 2.0.2を使用しようとしている間に依存関係を解決することができませんと一緒にScala 2.11.7SBT:。SPARK2.0 *:SCALA:未解決の依存関係がorg.glassfish.hk2とjavax.validation

私はsparkの最新バージョンを使用する必要がありますSparkSessionをサポートしているためです。以下の設定は、spark 1.6.2の場合は正常に動作します。しかし、私はこれが

scalaVersion := "2.11.7" 

val sparkVersion = "2.0.2" 

libraryDependencies ++= Seq(
    ws , 
    "org.apache.spark" %% "spark-core" % sparkVersion, 
    "org.apache.spark" %% "spark-sql" % sparkVersion, 
    "org.apache.spark" %% "spark-streaming" % sparkVersion, 
    "org.mongodb.spark" % "mongo-spark-connector_2.11" % "2.0.0", 
    specs2 % Test 
) 

私の依存関係の設定であり、これはエラーメッセージですspark 2.0.*

のためにしたい:私は依存関係を適用する際に間違ったをやっている場合

Error:Error while importing SBT project: 
[info] Resolving org.ow2.asm#asm-tree;4.1 ... 
[info] Resolving org.ow2.asm#asm-analysis;4.1 ... 
[info] Resolving org.ow2.asm#asm-util;4.1 ... 
[info] Resolving jline#jline;2.12.1 ... 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: org.glassfish.hk2#hk2-utils;2.22.2: not found 
[warn] :: org.glassfish.hk2#hk2-locator;2.22.2: not found 
[warn] :: javax.validation#validation-api;${javax.validation.version}: not found 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[trace] Stack trace suppressed: run 'last *:update' for the full output. 
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output. 
[error] (*:update) sbt.ResolveException: unresolved dependency: org.glassfish.hk2#hk2-utils;2.22.2: not found 
[error] unresolved dependency: org.glassfish.hk2#hk2-locator;2.22.2: not found 
[error] unresolved dependency: javax.validation#validation-api;${javax.validation.version}: not found 
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.glassfish.hk2#hk2-utils;2.22.2: not found 
[error] unresolved dependency: org.glassfish.hk2#hk2-locator;2.22.2: not found 
[error] unresolved dependency: javax.validation#validation-api;${javax.validation.version}: not found 
[error] Total time: 81 s, completed 3 Dec, 2016 8:51:18 PM 

は私を修正します。ありがとうございます

+0

あなたのdownvoteにコメントすることを考慮してください? –

答えて

2

おそらく依存関係の発行チェーンにエラーがあります。 1つの選択肢は、壊れた依存関係を除外することです - exclude("org.glassfish.hk2", "hk2-utils") exclude("org.glassfish.hk2", "hk2-locator") exclude("javax.validation", "validation-api")をこれらをもたらすSpark依存関係に追加し、これらの3つの依存関係の作業バージョンを明示的に追加します。

また、org.glassfish.hk2#hk2-utilsまたはorg.glassfish.hk2#hk2-locatorのバージョン2.22.2は表示されません。

+0

このMavenCentralはどのように報告できますか?これらだけでなく、実行時に 'fastxml-jackson'のようないくつかの壊れた依存関係があります –

関連する問題