2015-09-16 1 views
1

Dans mon fichier build.sbt j'ai ceci dans mon projet.IntelliJ: référence symbolique mauvaise scalac

scalaVersion := "2.10.4" 

libraryDependencies += "org.apache.spark" %% "spark-core" % "1.3.1" 
libraryDependencies += "org.apache.spark" % "spark-hive_2.10" % "1.3.1" 
libraryDependencies += "org.apache.spark" % "spark-graphx_2.10" % "1.3.1" 
libraryDependencies += "org.apache.spark" % "spark-mllib_2.10" % "1.3.1" 

Je le laisse simplement télécharger automatiquement toutes les bibliothèques. J'ajoute graphx, l'étincelle-core et le sdk scala à un de mes modules de projet, mais lorsque je tente de compiler je reçois:

Error:scalac: bad symbolic reference. A signature in RDD.class refers to term hadoop in package org.apache 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 RDD.class.

Error:scalac: bad symbolic reference. A signature in RDD.class refers to term io in value org.apache.hadoop 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 RDD.class.

Error:scalac: bad symbolic reference. A signature in RDD.class refers to term compress in value org.apache.io 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 RDD.class.

La chose étrange est de savoir si je télécharger graphx/MLlib directement des dépôts de manuscrits, il semble compiler. Des idées?

Répondre

0

Veuillez ajouter la dépendance hadoop. Quelque chose comme

libraryDependencies += "org.apache.hadoop" %% "hadoop-common" % "2.7.1" 
libraryDependencies += "org.apache.hadoop" %% "hadoop-hdfs" % "2.7.1" 

Vous devrez peut-être ajouter d'autres modules hadoop en fonction de votre application.

1

Une autre source d'erreur possible est le paramètre de version scalac incorrect dans le projet. Cliquez avec le bouton droit sur le projet -> Ouvrir les paramètres du module -> Bibliothèques globales, modifiez/ajoutez la version de scala-sdk appropriée à votre projet