title: Spark without Hadoop: Failed to Launch
body: <p>I'm running Spark 2.1.0, Hive 2.1.1 and Hadoop 2.7.3 on Ubuntu 16.04.</p>
  
  <p>I download the Spark project from github and build the "without hadoop" version:</p>
  
  <blockquote>
    <p>./dev/make-distribution.sh --name "hadoop2-without-hive" --tgz
    "-Pyarn,hadoop-provided,hadoop-2.7,parquet-provided"</p>
  </blockquote>
  
  <p>When I run <code>./sbin/start-master.sh</code>, I get the following exception:</p>
  
  <pre><code> Spark Command: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -cp /home/server/spark/conf/:/home/server/spark/jars/*:/home/server/hadoop/etc/hadoop/:/home/server/hadoop/share/hadoop/common/lib/:/home/server/hadoop/share/hadoop/common/:/home/server/hadoop/share/hadoop/mapreduce/:/home/server/hadoop/share/hadoop/mapreduce/lib/:/home/server/hadoop/share/hadoop/yarn/:/home/server/hadoop/share/hadoop/yarn/lib/ -Xmx1g org.apache.spark.deploy.master.Master --host ThinkPad-W550s-Lab --port 7077 --webui-port 8080
   ========================================
   Error: A JNI error has occurred, please check your installation and try again
   Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/Logger
       at java.lang.Class.getDeclaredMethods0(Native Method)
       at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
       at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
       at java.lang.Class.getMethod0(Class.java:3018)
       at java.lang.Class.getMethod(Class.java:1784)
       at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
       at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
   Caused by: java.lang.ClassNotFoundException: org.slf4j.Logger
       at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
       ... 7 more
  </code></pre>
  
  <p>I edit SPARK_DIST_CLASSPATH according to the post <a href="https://stackoverflow.com/questions/15188042/where-are-hadoop-jar-files-in-hadoop-2">Where are hadoop jar files in hadoop 2?</a></p>
  
  <pre><code>export SPARK_DIST_CLASSPATH=~/hadoop/share/hadoop/common/lib:~/hadoop/share/hadoop/common:~/hadoop/share/hadoop/mapreduce:~/hadoop/share/hadoop/mapreduce/lib:~/hadoop/share/hadoop/yarn:~/hadoop/share/hadoop/yarn/lib
  </code></pre>
  
  <p>But I'm still getting the same error. 
  I can see the slf4j jar file is under <code>~/hadoop/share/hadoop/common/lib</code>.</p>
  
  <p>How could I fix this error?</p>
  
  <p>Thank you!</p>