title: Spark SQLContext does not find hive tables
body: <p>i'm try to query an Hive table through a simple Spark Job (written in Java). </p>
  
  <pre><code>SparkConf conf = new SparkConf().setMaster("local[*]").setAppName("MyJob");
  
  JavaSparkContext sc = new JavaSparkContext(conf);
  SQLContext sqlContext = new org.apache.spark.sql.SQLContext(sc);
  
  DataFrame df = sqlContext.table("scf");
  </code></pre>
  
  <p>but when i submit the jar through <strong>spark-submit</strong>, i have the following error:</p>
  
  <pre><code>Exception in thread "main" org.apache.spark.sql.catalyst.analysis.NoSuchTableException
      at org.apache.spark.sql.catalyst.analysis.SimpleCatalog.lookupRelation(Catalog.scala:108)
      at org.apache.spark.sql.SQLContext.table(SQLContext.scala:831)
      at org.apache.spark.sql.SQLContext.table(SQLContext.scala:827)
      at MyJob.myJob(MyJob.java:30)
      at MyJob.main(MyJob.java:65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:729)
      at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
      at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
      at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
      at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
  </code></pre>
  
  <p><strong>I'm sure table exists</strong>. If i run <strong>sqlContext.table("scf").count</strong> in the spark-shell, it gives me the result.</p>
  
  <p>What could be the problem? </p>
  
  <p>Thanks!</p>