The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

HDFS Forum

Hadoop Core Issue

  • #25682

    Hello guys

    i’m trying to run a simple hadoop programme in which i have set one search function and set one maper class
    and one reduce class but when i run that programme at that time the class file of the (Map.class and Reduce.class) this both class can not be get at run time and internally by using (job.waitforcompletion(true)) this is the method in which finally the job will execute but at internally in this method it will throw the exception like class not found exception ( so i have not idea that how to solve this issue ..i have also set all jar in class path but still m getting same issue,hope any oneof u guys guide me,

    Kuldeep dayma

  • Author
  • #25689

    Hi Kuldeep,

    Can you post the stacktrace you are getting here? That will help us get to the bottom of your issue.



    Hello tedr this is the main method of my hadoop class

    Configuration conf = new Configuration();
    conf.set(“mapred.job.tracker”, “localhost:9001”);
    Job job = new Job(conf, “wordcount”);
    FileInputFormat.addInputPath(job, new Path(“/home/administrator/Desktop/test wordcount”));
    FileOutputFormat.setOutputPath(job, new Path(“/home/administrator/Desktop/test wordcount/output123h”));
    job.waitForCompletion(true); Internally this method throws the exception..
    here i have set map and redude class but at run time when this main mehtod is called at that time following exception is occur.

    13/05/17 10:08:41 INFO mapred.JobClient: Task Id : attempt_201305171006_0002_m_000000_2, Status : FAILED
    java.lang.RuntimeException: java.lang.ClassNotFoundException: test.hadoop.WordCount$Map
    at org.apache.hadoop.conf.Configuration.getClass(
    at org.apache.hadoop.mapreduce.JobContext.getMapperClass(
    at org.apache.hadoop.mapred.MapTask.runNewMapper(
    at org.apache.hadoop.mapred.Child$
    at Method)
    at org.apache.hadoop.mapred.Child.main(
    Caused by: java.lang.ClassNotFoundException: test.hadoop.WordCount$Map
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(
    at org.apache.hadoop.conf.Configuration.getClassByName(
    at org.apache.hadoop.conf.Configuration.getClass(
    … 8 more
    This exception m getting at run time,so can u give me the solution for that

    Seth Lyubich

    Hi Kuldeep,

    I think that this issue could be related to I think you should try to resolve the issue with Safe mode first. Also, you can try to run mapreduce smoke test and see if it succeeds or fails with similar error?

    Hope this helps,


The topic ‘Hadoop Core Issue’ is closed to new replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.