title: Hadoop: ClassNotFoundException - org.apache.hcatalog.rcfile.RCFileMapReduceOutputFormat
body: <p>I'm facing <code>ClassNotFoundException</code>, when I run my job for the class <code>org.apache.hcatalog.rcfile.RCFileMapReduceOutputFormat</code>. </p>
  
  <p>I tried to pass the additional jar files with <code>-libjars</code>, still I am facing the same issue. Any suggestions will be greatly helpful. Thanks in advance.</p>
  
  <p>Below is the command I am using and exception I am facing!</p>
  
  <pre><code>hadoop jar MyJob.jar MyDriver -libjars hcatalog-core-0.5.0-cdh4.4.0.jar inputDir OutputDir
  </code></pre>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hcatalog/rcfile/RCFileMapReduceOutputFormat <br>
            at com.cloudera.sa.omniture.mr.OmnitureToRCFileJob.run(OmnitureToRCFileJob.java:91) <br>
            at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) <br>
            at com.cloudera.sa.omniture.mr.OmnitureToRCFileJob.main(OmnitureToRCFileJob.java:131) <br>
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br>
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) <br>
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br>
            at java.lang.reflect.Method.invoke(Method.java:597) <br>
            at org.apache.hadoop.util.RunJar.main(RunJar.java:208) <br>
    <strong>Caused by: java.lang.ClassNotFoundException: org.apache.hcatalog.rcfile.RCFileMapReduceOutputFormat</strong> <br>
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202) <br>
            at java.security.AccessController.doPrivileged(Native Method) <br>
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190) <br>
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306) <br>
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247) <br>
            ... 8 more <br></p>
  </blockquote>
  
  <p>I implemented <code>ToolRunner</code> as well, below is the code which confirms that!</p>
  
  <pre class="lang-java prettyprint-override"><code>public class OmnitureToRCFileJob extends Configured implements Tool {
  
      public static void main(String[] args) throws Exception {
  
          OmnitureToRCFileJob processor = new OmnitureToRCFileJob();
          String[] otherArgs = new GenericOptionsParser(processor.getConf(), args).getRemainingArgs();
  
          System.exit(ToolRunner.run(processor.getConf(), processor, otherArgs));
      }
  
  }
  </code></pre>