Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
113 views
in Technique[技术] by (71.8m points)

java - Hadoop 2.0 JAR files

I am getting an unexpected error when trying to instantiate a Configuration object in my Map/Reduce program.

The error is as follows:

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

I am using Hadoop 2.2.0. The program worked fine with an earlier version of Hadoop. However, now I need to write this job submitter for the version 2, and this does not seem to be working.

As a side note, I could not find all the required JAR files for this version. I have read the following solution to a similar problem: Where are hadoop jar files in hadoop 2?. However, this did not work for me. It fails with the above runtime error.

I tried using older JAR files to resolve these issues, but new error keep occurring.

Does anyone have a solution to this problem? I am using NetBeans, if that makes any difference from some reason.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Including JARs in folders listed below worked for me: sharehadoopcommon
sharehadoopcommonlib
sharehadoopmapreduce
sharehadoopmapreducelib sharehadoopyarn
sharehadoopyarnlib


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...