title: warning:Multiple versions of scala libraries detected?
body: <p>My project is maven+intellij.
  And I develop in windows system.
  firstly I use the lastest scala libray version 2.12.2.For getting the class SQLContext and so on,I have to import spark jar:
  <a href="https://i.stack.imgur.com/bn0hG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bn0hG.png" alt="enter image description here"></a></p>
  
  <p>but then I was told that if I want to use this spark jar,I have to lower my scala version,So I delete the libiray and changed to 2.10....but now when I mvn_clean_install.I got this :</p>
  
  <pre><code>[WARNING]  Expected all dependencies to require Scala version: 2.11.7
  [WARNING]  com.twitter:chill_2.11:0.5.0 requires scala version: 2.11.7
  [WARNING]  com.typesafe.akka:akka-remote_2.11:2.3.11 requires scala version: 2.11.7
  [WARNING]  com.typesafe.akka:akka-actor_2.11:2.3.11 requires scala version: 2.11.7
  [WARNING]  com.typesafe.akka:akka-slf4j_2.11:2.3.11 requires scala version: 2.11.7
  [WARNING]  org.apache.spark:spark-core_2.11:1.6.1 requires scala version: 2.11.7
  [WARNING]  org.json4s:json4s-jackson_2.11:3.2.10 requires scala version: 2.11.7
  [WARNING]  org.json4s:json4s-core_2.11:3.2.10 requires scala version: 2.11.7
  [WARNING]  org.json4s:json4s-ast_2.11:3.2.10 requires scala version: 2.11.7
  [WARNING]  org.json4s:json4s-core_2.11:3.2.10 requires scala version: 2.11.0
  [WARNING] Multiple versions of scala libraries detected!
  [INFO] E:\...\src\main\scala:-1: info: compiling
  [INFO] Compiling 4 source files to E:\...\target\classes at 1491813951772
  [ERROR] E:\...\qubole\mapreduce\ConvertToParquetFormat.scala:2: error: object sql is not a member of package org.apache.spark
  [ERROR] import org.apache.spark.sql.SQLContext
  [ERROR]                         ^
  [ERROR] E:\...\qubole\mapreduce\ConvertToParquetFormat.scala:15: error: not found: type SQLContext
  [ERROR]   val sqlContext = new SQLContext(sc)
  [ERROR]                        ^
  [ERROR] E:\...\mapreduce\ConvertToParquetFormat.scala:24: error: value toDF is not a member of org.apache.spark.rdd.RDD[....qubole.mapreduce.ConvertToParquetFormat.OmnitureHit]
  [ERROR] possible cause: maybe a semicolon is missing before `value toDF'?
  [ERROR]   .toDF().write.parquet ("file:///C:/Users/Desktop/456")
  [ERROR]    ^
  [ERROR] three errors found
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 03:00 min
  [INFO] Finished at: 2017-04-10T16:45:58+08:00
  [INFO] Final Memory: 33M/360M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.0:compile (scala-compile-first) on project packages-omniture-qubole-mapreduce: wrap: org.apache.commons.exec.ExecuteException: Process exited with an er
  ror: 1 (Exit value: 1) -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  
  E:\github\mia\packages-omniture-qubole-mapreduce&gt;
  </code></pre>
  
  <p>so I delete the scala 10 version ,and it told me I do not have one scala libray.then I add a scala 2.11.since it looks like some jars need 2.11 version still <code>Multiple versions of scala libraries detected?</code></p>
  
  <p>But when I ctrl+left_cilck the word SQLContext, I can go to the page ,but it is anonymous.</p>
  
  <p><a href="https://i.stack.imgur.com/pnFko.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/pnFko.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/MJa8i.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/MJa8i.jpg" alt="enter image description here"></a>
  Is that because I forget to delete something about the old jar or libary? 
  and this is my left dependence list:
  <a href="https://i.stack.imgur.com/1mfhb.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/1mfhb.jpg" alt="enter image description here"></a><a href="https://i.stack.imgur.com/9JLhJ.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/9JLhJ.jpg" alt="enter image description here"></a><a href="https://i.stack.imgur.com/Uw1Xi.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Uw1Xi.jpg" alt="enter image description here"></a></p>
  
  <p>this is my pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.company.www&lt;/groupId&gt;
      &lt;artifactId&gt;packages-omniture-qubole-mapreduce&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;com.company.www.platform&lt;/groupId&gt;
          &lt;artifactId&gt;platform-parent-spark&lt;/artifactId&gt;
          &lt;version&gt;0.1.41&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;spark.mapreduce.mainclass&gt;com.company.www.packages.omniture.qubole.mapreduce.SampleMapReduceJob&lt;/spark.mapreduce.mainclass&gt;
      &lt;/properties&gt;
  
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
              &lt;artifactId&gt;spark-core_${scala.major.minor.version}&lt;/artifactId&gt;
              &lt;version&gt;${spark.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.company.www.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-spark&lt;/artifactId&gt;
              &lt;version&gt;[1.0.17, ]&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.company.www&lt;/groupId&gt;
              &lt;artifactId&gt;exp-user-interaction-messages-v1&lt;/artifactId&gt;
              &lt;version&gt;[1.4,]&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.scalaj&lt;/groupId&gt;
              &lt;artifactId&gt;scalaj-http_${scala.major.minor.version}&lt;/artifactId&gt;
              &lt;version&gt;1.1.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;version&gt;2.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.parboiled&lt;/groupId&gt;
              &lt;artifactId&gt;parboiled-java&lt;/artifactId&gt;
              &lt;version&gt;1.0.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;shade&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;finalName&gt;packages-omniture-qubole-mapreduce&lt;/finalName&gt;
                              &lt;shadedArtifactAttached&gt;false&lt;/shadedArtifactAttached&gt;
                              &lt;artifactSet&gt;
                                  &lt;includes&gt;
                                      &lt;include&gt;*:*&lt;/include&gt;
                                  &lt;/includes&gt;
                              &lt;/artifactSet&gt;
                              &lt;filters&gt;
                                  &lt;filter&gt;
                                      &lt;artifact&gt;*:*&lt;/artifact&gt;
                                      &lt;excludes&gt;
                                          &lt;exclude&gt;META-INF/*.SF&lt;/exclude&gt;
                                          &lt;exclude&gt;META-INF/*.DSA&lt;/exclude&gt;
                                          &lt;exclude&gt;META-INF/*.RSA&lt;/exclude&gt;
                                      &lt;/excludes&gt;
                                  &lt;/filter&gt;
                              &lt;/filters&gt;
                              &lt;transformers&gt;
                                  &lt;transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /&gt;
                                  &lt;transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"&gt;
                                      &lt;resource&gt;reference.conf&lt;/resource&gt;
                                  &lt;/transformer&gt;
                                  &lt;transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer"&gt;
                                      &lt;resource&gt;log4j.properties&lt;/resource&gt;
                                  &lt;/transformer&gt;
                                  &lt;transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"&gt;
                                      &lt;mainClass&gt;${spark.mapreduce.mainclass}&lt;/mainClass&gt;
                                  &lt;/transformer&gt;
                              &lt;/transformers&gt;
                              &lt;relocations&gt;
                                  &lt;relocation&gt;
                                      &lt;pattern&gt;org.eclipse.jetty&lt;/pattern&gt;
                                      &lt;shadedPattern&gt;org.spark-project.jetty&lt;/shadedPattern&gt;
                                      &lt;includes&gt;
                                          &lt;include&gt;org.eclipse.jetty.**&lt;/include&gt;
                                      &lt;/includes&gt;
                                  &lt;/relocation&gt;
                                  &lt;relocation&gt;
                                      &lt;pattern&gt;com.google.common&lt;/pattern&gt;
                                      &lt;shadedPattern&gt;org.spark-project.guava&lt;/shadedPattern&gt;
                                      &lt;excludes&gt;
                                          &lt;exclude&gt;com/google/common/base/Absent*&lt;/exclude&gt;
                                          &lt;exclude&gt;com/google/common/base/Function&lt;/exclude&gt;
                                          &lt;exclude&gt;com/google/common/base/Optional*&lt;/exclude&gt;
                                          &lt;exclude&gt;com/google/common/base/Present*&lt;/exclude&gt;
                                          &lt;exclude&gt;com/google/common/base/Supplier&lt;/exclude&gt;
                                      &lt;/excludes&gt;
                                  &lt;/relocation&gt;
                              &lt;/relocations&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>