title: NoSuchMethodError: org.apache.spark.sql.SQLContext.sql
body: <p>I write a Spark program with elastic search libraries.</p>
  
  <p>Here is my build.sbt.</p>
  
  <pre><code>scalaVersion := "2.10.5"
  val sparkVersion = "2.0.1"
  
  libraryDependencies ++= Seq(
  "org.apache.spark" %% "spark-core" % sparkVersion % "provided",
  "org.apache.spark" %% "spark-sql" % sparkVersion % "provided",
  "org.apache.spark" %% "spark-catalyst" % sparkVersion % "provided",
  "org.apache.spark" %% "spark-hive" % sparkVersion % "provided"
  )
  
  libraryDependencies += "org.elasticsearch" % "elasticsearch-spark_2.10" % "2.3.3"
  libraryDependencies += "org.elasticsearch" % "elasticsearch" % "2.3.3"
  </code></pre>
  
  <p>Here is error message.</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: org.apache.spark.sql.SQLContext.sql(Ljava/lang/String;)Lorg/apache/spark/sql/Dataset;
  at com.minsu.house.BatchProgram.process(BatchProgram.scala:67)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:674)
  at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
  at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
  at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
  at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
  </code></pre>
  
  <p>And My code is as follows...</p>
  
  <pre><code>val sqlContext = new SQLContext(sparkContext)
  val dataframe = sqlContext.sql(sqlString)     // &lt;----- HERE !!!
  </code></pre>
  
  <p>I do not think it has anything to do with the elastic-search library.</p>
  
  <p>It simply seems to be due to dependency or version problems.</p>
  
  <p>What should I do? Help me.. Thank you.</p>