title: Running hadoop job: Class not found - org.apache.tools.ant.launch.AntMain
body: <p>I have locally installed Hadoop on Debian linux distribution in vmware and I am having difficulties running my test jobs.</p>
  
  <p>I can easily build create the package with IntelliJ Idea, even my mrunit tests pass as expected.</p>
  
  <p>Once I try to run the job, I get following exception: </p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:264)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:190)
  Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMain
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
  </code></pre>
  
  <p>I made sure, all the dependencies, are included in the jar - I can see, that ANT 1.6.5 is included.</p>
  
  <p>I even tried to install ANT and set $ANT_HOME to its location, but with no effect.</p>
  
  <p>What I might be doing wrong?</p>
  
  <p>I am using following pom.xml:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;tl.knyt&lt;/groupId&gt;
      &lt;artifactId&gt;hanoi&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;name&gt;Hanoi&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
              &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
              &lt;version&gt;0.20.2-cdh3u4&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
              &lt;artifactId&gt;hadoop-mrunit&lt;/artifactId&gt;
              &lt;version&gt;0.20.2-cdh3u4&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.10&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;cloudera.repos&lt;/id&gt;
              &lt;url&gt;https://repository.cloudera.com/artifactory/cloudera-repos/&lt;/url&gt;
              &lt;name&gt;Cloudera Repos&lt;/name&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Thanks!</p>