FAQ
Hi all,

I extended my project path with the hadoop-0.20.2-core.jar file,
but I can see that some of the classes I need aren't there, so for
example an error I get:

" The type org.apache.commons.logging.Log cannot be resolved. It
is indirectly referenced from required .class files- implements "

Because I'm trying to use a MultiFileInputFormat for the WordCount
example as follows:

public class wcMultiFileInputFormat extends
MultiFileInputFormat<LongWritable, Text>{

public LineRecordReader getRecordReader(InputSplit split, JobConf
job, Reporter reporter){
return (new LineRecordReader());
}
}

Can someone guide me to how to solve this in a different way
(ie.Make each input file unSplittable) ... or how to add the required
missing log.class?

Thank you so much,
Maha

Search Discussions

  • Li ping at Dec 12, 2010 at 2:27 am
    Can you try to add the jar file in your Hadoop lib directory.

    On Sun, Dec 12, 2010 at 8:00 AM, Maha A. Alabduljalil
    wrote:
    Hi all,

    I extended my project path with the hadoop-0.20.2-core.jar file, but I can
    see that some of the classes I need aren't there, so for example an error I
    get:

    " The type org.apache.commons.logging.Log cannot be resolved. It is
    indirectly referenced from required .class files- implements "

    Because I'm trying to use a MultiFileInputFormat for the WordCount example
    as follows:

    public class wcMultiFileInputFormat extends
    MultiFileInputFormat<LongWritable, Text>{

    public LineRecordReader getRecordReader(InputSplit split, JobConf
    job, Reporter reporter){
    return (new LineRecordReader());
    }
    }

    Can someone guide me to how to solve this in a different way (ie.Make each
    input file unSplittable) ... or how to add the required missing log.class?

    Thank you so much,
    Maha


    --
    -----李平
  • Maha at Dec 12, 2010 at 4:37 am
    This is a compilation error I get in Eclipse ... So, I don't so how putting the hadoop-core.jar in the lib/ directory will change the error.
    Do you suggest another way of running a hadoop java program ?

    The way I do it is .. Create an Eclipse project , Build Paths --> Add External Archives: hadoop-core.jar and that's it ! When I check inside the jar, I can't find the binary class file I'm looking for. So how can I add a binary files to this jar? I tried adding the source file, but this requires a cascading addition of other files. What shall I do?

    Although, I still appreciate your thoughts, thanks,

    Maha

    What I do is create a new pro
    On Dec 11, 2010, at 6:27 PM, li ping wrote:

    Can you try to add the jar file in your Hadoop lib directory.

    On Sun, Dec 12, 2010 at 8:00 AM, Maha A. Alabduljalil
    wrote:
    Hi all,

    I extended my project path with the hadoop-0.20.2-core.jar file, but I can
    see that some of the classes I need aren't there, so for example an error I
    get:

    " The type org.apache.commons.logging.Log cannot be resolved. It is
    indirectly referenced from required .class files- implements "

    Because I'm trying to use a MultiFileInputFormat for the WordCount example
    as follows:

    public class wcMultiFileInputFormat extends
    MultiFileInputFormat<LongWritable, Text>{

    public LineRecordReader getRecordReader(InputSplit split, JobConf
    job, Reporter reporter){
    return (new LineRecordReader());
    }
    }

    Can someone guide me to how to solve this in a different way (ie.Make each
    input file unSplittable) ... or how to add the required missing log.class?

    Thank you so much,
    Maha


    --
    -----李平
  • Harsh J at Dec 12, 2010 at 4:48 am
    Try adding the commons-logging jar to your build path. It is available
    in the lib/ folder of your Hadoop distribution.

    If you use the MapReduce eclipse plugin which comes with the Hadoop
    distro, it would add all required jars to create a Hadoop project
    automatically (i.e. everything in lib/*.jar +
    hadoop-mapred/hdfs/common).
    On Sun, Dec 12, 2010 at 10:06 AM, maha wrote:
    This is a compilation error I get in Eclipse ... So, I don't so how putting the hadoop-core.jar in the lib/ directory will change the error.
    Do you suggest another way of running a hadoop java program ?

    The way I do it is .. Create an Eclipse project , Build Paths --> Add External Archives: hadoop-core.jar and that's it !  When I check inside the jar, I can't find the binary class file I'm looking for. So how can I add a binary files to this jar? I tried adding the source file, but this requires a cascading addition of other files. What shall I do?

    Although, I still appreciate your thoughts, thanks,

    Maha

    What I do is create a new pro
    On Dec 11, 2010, at 6:27 PM, li ping wrote:

    Can you try to add the jar file in your Hadoop lib directory.

    On Sun, Dec 12, 2010 at 8:00 AM, Maha A. Alabduljalil
    wrote:
    Hi all,

    I extended my project path with the hadoop-0.20.2-core.jar file, but I can
    see that some of the classes I need aren't there, so for example an error I
    get:

    "  The type org.apache.commons.logging.Log cannot be resolved. It is
    indirectly referenced from required .class files- implements  "

    Because I'm trying to use a MultiFileInputFormat for the WordCount example
    as follows:

    public class wcMultiFileInputFormat extends
    MultiFileInputFormat<LongWritable, Text>{

    public LineRecordReader getRecordReader(InputSplit split, JobConf
    job, Reporter reporter){
    return (new LineRecordReader());
    }
    }

    Can someone guide me to how to solve this in a different way (ie.Make each
    input file unSplittable) ... or how to add the required missing log.class?

    Thank you so much,
    Maha


    --
    -----李平


    --
    Harsh J
    www.harshj.com
  • Maha at Dec 12, 2010 at 7:20 pm
    Thanks for the advice Harsh! This worked :)

    Maha
    On Dec 11, 2010, at 8:48 PM, Harsh J wrote:

    Try adding the commons-logging jar to your build path. It is available
    in the lib/ folder of your Hadoop distribution.

    If you use the MapReduce eclipse plugin which comes with the Hadoop
    distro, it would add all required jars to create a Hadoop project
    automatically (i.e. everything in lib/*.jar +
    hadoop-mapred/hdfs/common).
    On Sun, Dec 12, 2010 at 10:06 AM, maha wrote:
    This is a compilation error I get in Eclipse ... So, I don't so how putting the hadoop-core.jar in the lib/ directory will change the error.
    Do you suggest another way of running a hadoop java program ?

    The way I do it is .. Create an Eclipse project , Build Paths --> Add External Archives: hadoop-core.jar and that's it ! When I check inside the jar, I can't find the binary class file I'm looking for. So how can I add a binary files to this jar? I tried adding the source file, but this requires a cascading addition of other files. What shall I do?

    Although, I still appreciate your thoughts, thanks,

    Maha

    What I do is create a new pro
    On Dec 11, 2010, at 6:27 PM, li ping wrote:

    Can you try to add the jar file in your Hadoop lib directory.

    On Sun, Dec 12, 2010 at 8:00 AM, Maha A. Alabduljalil
    wrote:
    Hi all,

    I extended my project path with the hadoop-0.20.2-core.jar file, but I can
    see that some of the classes I need aren't there, so for example an error I
    get:

    " The type org.apache.commons.logging.Log cannot be resolved. It is
    indirectly referenced from required .class files- implements "

    Because I'm trying to use a MultiFileInputFormat for the WordCount example
    as follows:

    public class wcMultiFileInputFormat extends
    MultiFileInputFormat<LongWritable, Text>{

    public LineRecordReader getRecordReader(InputSplit split, JobConf
    job, Reporter reporter){
    return (new LineRecordReader());
    }
    }

    Can someone guide me to how to solve this in a different way (ie.Make each
    input file unSplittable) ... or how to add the required missing log.class?

    Thank you so much,
    Maha


    --
    -----李平


    --
    Harsh J
    www.harshj.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-user @
categorieshadoop
postedDec 12, '10 at 12:00a
activeDec 12, '10 at 7:20p
posts5
users3
websitehadoop.apache.org...
irc#hadoop

3 users in discussion

Maha: 3 posts Harsh J: 1 post Li ping: 1 post

People

Translate

site design / logo © 2022 Grokbase