title: Spark-error when trying to read json file from local FS
body: <p>I am trying to run a basic scala-spark example:</p>
  
  <pre><code>object LoadJsonWithSparkSQL{
     def main(args: Array[String]) {
       val master = "local"
       val inputFile = "/path/to/my/local/file"    
       val warehouseLocation = "/path/to/spark-warehouse"
  
       val sparkSession = SparkSession.builder.
           master(master)
          .appName("LoadJsonWithSparkSQL")
          .config("spark.sql.warehouse.dir", warehouseLocation)
          .getOrCreate()
  
      val input = sparkSession.read.json(inputFile)
      input.printSchema()
      sparkSession.stop()
  </code></pre>
  
  <p>A spark session is created. While trying to read the json file I get the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.fs.FileStatus.isDirectory()Z
  at org.apache.spark.sql.execution.datasources.ListingFileCatalog$$anonfun$1$$anonfun$apply$2.apply(ListingFileCatalog.scala:129)
  at org.apache.spark.sql.execution.datasources.ListingFileCatalog$$anonfun$1$$anonfun$apply$2.apply(ListingFileCatalog.scala:116)
  at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
  at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
  at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
  at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108)
  at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
  at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:108)
  at org.apache.spark.sql.execution.datasources.ListingFileCatalog$$anonfun$1.apply(ListingFileCatalog.scala:116)
  at org.apache.spark.sql.execution.datasources.ListingFileCatalog$$anonfun$1.apply(ListingFileCatalog.scala:102)
  at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
  at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
  at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
  at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
  at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
  at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
  at org.apache.spark.sql.execution.datasources.ListingFileCatalog.listLeafFiles(ListingFileCatalog.scala:102)
  at org.apache.spark.sql.execution.datasources.ListingFileCatalog.refresh(ListingFileCatalog.scala:75)
  at org.apache.spark.sql.execution.datasources.ListingFileCatalog.&lt;init&gt;(ListingFileCatalog.scala:56)
  at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:379)
  at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:149)
  at org.apache.spark.sql.DataFrameReader.json(DataFrameReader.scala:287)
  at org.apache.spark.sql.DataFrameReader.json(DataFrameReader.scala:249)
  at LoadJsonWithSparkSQL$.main(LoadJsonWithSparkSQL.scala:50)
  at LoadJsonWithSparkSQL.main(LoadJsonWithSparkSQL.scala) 17/07/26 17:13:37 INFO spark.SparkContext: Invoking stop() from shutdown hook
  </code></pre>
  
  <p>Any ideas how to fix that?</p>
  
  <p>My set-up is: </p>
  
  <p>spark: 2.0.0</p>
  
  <p>scala: 2.10</p>
  
  <p>All files are on my local FS.</p>