title: spark submit java.lang.NullPointerException error
body: <p>I am trying to submit my spark-mongo code jar through spark on windows.I am using spark in standalone mode. I have configured spark master and two workers on same machine. I want to execute my jar with one master and two workers.I am trying to execute following command: <code>spark-submit --master spark://localhost:7077 --deploy-mode cluster  --executor-memory 5G --class spark.mongohadoop.testing3 G:\sparkmon1.jar</code></p>
  
  <p>I am facing following error:</p>
  
  <pre><code>Running Spark using the REST application submission protocol.
  Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
  17/02/28 17:09:13 INFO RestSubmissionClient: Submitting a request to launch an application in spark://192.168.242.1:7077.
  17/02/28 17:09:24 WARN RestSubmissionClient: Unable to connect to server spark://192.168.242.1:7077.
  Warning: Master endpoint spark://192.168.242.1:7077 was not a REST server. Falling back to legacy submission gateway instead.
  17/02/28 17:09:25 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  17/02/28 17:09:32 ERROR ClientEndpoint: Exception from cluster was: java.lang.NullPointerException
  java.lang.NullPointerException
          at java.lang.ProcessBuilder.start(ProcessBuilder.java:1012)
          at org.apache.hadoop.util.Shell.runCommand(Shell.java:482)
          at org.apache.hadoop.util.Shell.run(Shell.java:455)
          at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:715)
          at org.apache.hadoop.fs.FileUtil.chmod(FileUtil.java:873)
          at org.apache.hadoop.fs.FileUtil.chmod(FileUtil.java:853)
          at org.apache.spark.util.Utils$.fetchFile(Utils.scala:474)
          at org.apache.spark.deploy.worker.DriverRunner.org$apache$spark$deploy$worker$DriverRunner$$downloadUserJar(DriverRunner.scala:154)
          at org.apache.spark.deploy.worker.DriverRunner$$anon$1.run(DriverRunner.scala:83
  </code></pre>
  
  <p>I have already set winutil path in env.
  why I am getting this error and what is the solution?</p>