title: Getting java.lang.ClassNotFoundException while running Spark Application
body: <p>I am new to Spark (Scala) and I am trying to run one spark application through spark submit. Unfortunately I am getting <code>java.lang.ClassNotFoundException</code> exception.</p>
  
  <p>Here is my spark submit command:</p>
  
  <pre><code>./spark-submit --class "spark.phoenix.a" --master local --deploy-mode client /home/ec2-user/phoenix-0.0.1-SNAPSHOT.jar
  </code></pre>
  
  <p>Here is my Exception:</p>
  
  <pre><code>java.lang.ClassNotFoundException: spark.phoenix.a
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:348)
      at org.apache.spark.util.Utils$.classForName(Utils.scala:175)
      at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:689)
      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>Here is my sample code:</p>
  
  <pre><code>package spark.phoenix
  import org.apache.spark.SparkConf
  import org.apache.spark.sql.SQLContext
  
  object a {
  
    def main(args: Array[String]) {
      import org.apache.phoenix.spark._
      import org.apache.spark.SparkContext
  
      val zkQuorum = "localhost:2181"
      val master = "local[*]"
      val sparkConf = new SparkConf()
      sparkConf.setAppName("phoenix-spark-save")
          .setMaster(s"${master}")
      val sc = new SparkContext(sparkConf)
      val sqlContext = new SQLContext(sc)
  
      // read from orders phoenix table
      val df = sqlContext.phoenixTableAsDataFrame("TABLE1",
          Seq.apply("ID", "COL1"),
          zkUrl = Some.apply(s"${zkQuorum}") )
  
  
    }
  }
  </code></pre>