title: Hadoop 1.2.1: Put jars in hdfs on classpath
body: <p>I have a hadoop job which requires several 3rd party jars. I have put them on the classpath with <code>conf/hadoop-env.sh</code></p>
  
  <pre><code>export HADOOP_CLASSPATH=hdfs://name.node.private.ip:9000/home/ec2-user/hadoop-gremlin-libs/
  </code></pre>
  
  <p>When I run <code>$ bin/hadoop classpath</code> this path is included, as you can see <a href="https://pastebin.com/wh6kb87g" rel="nofollow noreferrer" title="here">here</a>. However, when I go to run a job, it throws an error in initialization:</p>
  
  <pre><code>Error: java.lang.ClassNotFoundException: com.google.common.collect.Lists
      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)
      at org.apache.giraph.conf.AllOptions.&lt;clinit&gt;(AllOptions.java:37)
      at org.apache.giraph.conf.ClassConfOption.&lt;init&gt;(ClassConfOption.java:47)
      at org.apache.giraph.conf.ClassConfOption.create(ClassConfOption.java:60)
      at org.apache.giraph.conf.GiraphConstants.&lt;clinit&gt;(GiraphConstants.java:62)
      at org.apache.giraph.conf.GiraphClasses.readFromConf(GiraphClasses.java:152)
      at org.apache.giraph.conf.GiraphClasses.&lt;init (GiraphClasses.java:142)
      at org.apache.giraph.conf.ImmutableClassesGiraphConfiguration.&lt;init&gt;(ImmutableClassesGiraphConfiguration.java:93)
      at org.apache.giraph.bsp.BspOutputFormat.getOutputCommitter(BspOutputFormat.java:56)
      at org.apache.hadoop.mapred.Task.initialize(Task.java:515)
      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347)
      at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:422)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
      at org.apache.hadoop.mapred.Child.main(Child.java:249)
  </code></pre>
  
  <p>This particular class should be packaged in guava, which is included on the classpath:</p>
  
  <pre><code>[ec2-user]$ bin/hadoop dfs -ls /home/ec2-user/hadoop-gremlin-libs | grep guava
  -rw-r--r--   3 ec2-user supergroup          0 2017-04-20 17:57 /home/ec2-user/hadoop-gremlin-libs/guava-18.0.jar
  </code></pre>
  
  <p>I am submitting the job from gremlin as follows:</p>
  
  <pre><code>graph = GraphFactory.open('conf/hadoop.properties')
  result = graph.compute().program(MyVertexProgram.build().create()).submit().get()
  </code></pre>
  
  <p>I have also tried putting the jars on the local filesystem and receive the same error. Does anyone know how to solve this issue?</p>