Unable to upload jar via livy client to livy session
<p>Code : </p>

<pre><code>LivyClient client = null;
try
{
  String livyUrl = "http://dummy16814.zycus.net:8998";
  client = new LivyClientBuilder().setURI(new URI(livyUrl)).build();

  String piJar = "E:\\livy_old.jar";
  System.err.printf("Uploading %s to the Spark context...\n", piJar);
  client.uploadJar(new File(piJar)).get();

  int samples = 10;
  System.err.printf("Running PiJob with %d samples...\n", samples);

  double pi = client.submit(new PiJob()).get();
  System.out.println("Pi is roughly: " + pi);
}
finally
{
  client.stop(true);
}
</code></pre>

<p>Getting below exception while uploading jar</p>

<blockquote>
  <p>Uploading E:\livy_old.jar to the Spark context... Exception in thread
  "main" java.util.concurrent.ExecutionException: java.io.IOException:
  Bad Request: "requirement failed: Local path
  /root/.livy-sessions/61a5e39c-d199-4bb8-967b-960b4e3e9ee3/livy_old.jar
  cannot be added to user sessions."    at
  java.util.concurrent.FutureTask.report(FutureTask.java:122)   at
  java.util.concurrent.FutureTask.get(FutureTask.java:192)  at
  com.zycus.spark.PiJob.main(PiJob.java:64) Caused by:
  java.io.IOException: Bad Request: "requirement failed: Local path
  /root/.livy-sessions/61a5e39c-d199-4bb8-967b-960b4e3e9ee3/livy_old.jar
  cannot be added to user sessions."    at
  com.cloudera.livy.client.http.LivyConnection.sendRequest(LivyConnection.java:197)
    at
  com.cloudera.livy.client.http.LivyConnection.post(LivyConnection.java:162)
    at
  com.cloudera.livy.client.http.HttpClient$2.call(HttpClient.java:155)
    at
  com.cloudera.livy.client.http.HttpClient$2.call(HttpClient.java:152)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)</p>
</blockquote>