title: NoClassDefFoundError for simple Yarn application
body: <p>I was trying to run the simple yarn application from <a href="https://github.com/hortonworks/simple-yarn-app" rel="nofollow">simple-yarn-app</a>. But I am getting the following exception in my application error logs.</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/conf/YarnConfiguration
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
      at java.lang.Class.getMethod0(Class.java:2774)
      at java.lang.Class.getMethod(Class.java:1663)
      at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
      at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
  Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.yarn.conf.YarnConfiguration
  </code></pre>
  
  <p>But if I run "yarn classpath" command on all my datanodes, I see the following output:</p>
  
  <pre><code>/etc/hadoop/conf:/usr/lib/hadoop/lib/*:/usr/lib/hadoop/.//*:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/*:/usr/lib/hadoop-hdfs/.//*:/usr/lib/hadoop-yarn/lib/*:/usr/lib/hadoop-yarn/.//*:/usr/lib/hadoop-mapreduce/lib/*:/usr/lib/hadoop-mapreduce/.//*:/usr/lib/hadoop-yarn/.//*:/usr/lib/hadoop-yarn/lib/*
  </code></pre>
  
  <p>which has the path to the yarn-client, yarn-api, yarn-common and the hadoop-common jars required by the application. Can anyone point me to the direction where I might have forgotten to set the right classpath.</p>