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












0














I install Hadoop-0.20.2 in windows using cygwin. If i run



 $ bin/hadoop version
Hadoop 0.20.2
Subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707
Compiled by chrisdo on Fri Feb 19 08:07:34 UTC 2010


It Works Properly but If I run




namenode -format




it will return error like below



$ bin/hadoop namenode -format
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<clinit>(NameNode.java:101)
Exception in thread "main"


Kindly help me to solve the issue










share|improve this question






















  • Can you post the result of bin/hadoop classpath (back into your original question, not as a comment)?
    – Chris White
    Oct 1 '13 at 23:15










  • @ChrisWhite bin/hadoop classpath java.lang.NoClassDefFoundError: classpath Exception in thread "main"
    – Siddhu
    Oct 3 '13 at 5:14
















0














I install Hadoop-0.20.2 in windows using cygwin. If i run



 $ bin/hadoop version
Hadoop 0.20.2
Subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707
Compiled by chrisdo on Fri Feb 19 08:07:34 UTC 2010


It Works Properly but If I run




namenode -format




it will return error like below



$ bin/hadoop namenode -format
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<clinit>(NameNode.java:101)
Exception in thread "main"


Kindly help me to solve the issue










share|improve this question






















  • Can you post the result of bin/hadoop classpath (back into your original question, not as a comment)?
    – Chris White
    Oct 1 '13 at 23:15










  • @ChrisWhite bin/hadoop classpath java.lang.NoClassDefFoundError: classpath Exception in thread "main"
    – Siddhu
    Oct 3 '13 at 5:14














0












0








0







I install Hadoop-0.20.2 in windows using cygwin. If i run



 $ bin/hadoop version
Hadoop 0.20.2
Subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707
Compiled by chrisdo on Fri Feb 19 08:07:34 UTC 2010


It Works Properly but If I run




namenode -format




it will return error like below



$ bin/hadoop namenode -format
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<clinit>(NameNode.java:101)
Exception in thread "main"


Kindly help me to solve the issue










share|improve this question













I install Hadoop-0.20.2 in windows using cygwin. If i run



 $ bin/hadoop version
Hadoop 0.20.2
Subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707
Compiled by chrisdo on Fri Feb 19 08:07:34 UTC 2010


It Works Properly but If I run




namenode -format




it will return error like below



$ bin/hadoop namenode -format
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<clinit>(NameNode.java:101)
Exception in thread "main"


Kindly help me to solve the issue







eclipse hadoop cygwin






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 1 '13 at 20:36









Siddhu

74621022




74621022












  • Can you post the result of bin/hadoop classpath (back into your original question, not as a comment)?
    – Chris White
    Oct 1 '13 at 23:15










  • @ChrisWhite bin/hadoop classpath java.lang.NoClassDefFoundError: classpath Exception in thread "main"
    – Siddhu
    Oct 3 '13 at 5:14


















  • Can you post the result of bin/hadoop classpath (back into your original question, not as a comment)?
    – Chris White
    Oct 1 '13 at 23:15










  • @ChrisWhite bin/hadoop classpath java.lang.NoClassDefFoundError: classpath Exception in thread "main"
    – Siddhu
    Oct 3 '13 at 5:14
















Can you post the result of bin/hadoop classpath (back into your original question, not as a comment)?
– Chris White
Oct 1 '13 at 23:15




Can you post the result of bin/hadoop classpath (back into your original question, not as a comment)?
– Chris White
Oct 1 '13 at 23:15












@ChrisWhite bin/hadoop classpath java.lang.NoClassDefFoundError: classpath Exception in thread "main"
– Siddhu
Oct 3 '13 at 5:14




@ChrisWhite bin/hadoop classpath java.lang.NoClassDefFoundError: classpath Exception in thread "main"
– Siddhu
Oct 3 '13 at 5:14












1 Answer
1






active

oldest

votes


















0














If you using this lib org.apache.commons.logging.LogFactory then you should probably initialize log according to classes @ coding



Example



private static Log LOG = LogFactory.getLog(ClassName.class);



It has .class extension when compile you should make sure whether that class created or not else it will give an exception, i guess



Check the classpath too



Issue-java.lang.NoClassDefFoundError



Root Cause: Incorrect Java path set in Environment Variable Section



Solution: Set correct JAVA_HOME Path



Steps->Environment Variable Setting (My Comp-Right Click ->Properties->Env Variable->Advance Tab ->Variable)



Create new JAVA_HOME Environment Variable.



JAVA_HOME .;C:Program Files (x86)Javajdk1.6.0_14



Set JAVA_HOME variable in PATH Variable section.



PATH %JAVA_HOME%bin



Set JAVA_HOME variable in CLASSPATH Variable



CLASSPATH %JAVA_HOME%jrelib



Restart System



Verify all variable



echo %CLASSPATH%



echo %JAVA_HOME%



echo %PATH%



Compile & Run the program






share|improve this answer























  • Did you even read the question? He isn't writing any code.
    – user93353
    Oct 2 '13 at 13:40










  • @user93353 that's why i finally mentioned Check the classpath too, now i edited with steps for how to check the classpath.
    – Yasa
    Oct 3 '13 at 4:49













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f19125410%2fjava-lang-noclassdeffounderror-org-apache-commons-logging-logfactory%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














If you using this lib org.apache.commons.logging.LogFactory then you should probably initialize log according to classes @ coding



Example



private static Log LOG = LogFactory.getLog(ClassName.class);



It has .class extension when compile you should make sure whether that class created or not else it will give an exception, i guess



Check the classpath too



Issue-java.lang.NoClassDefFoundError



Root Cause: Incorrect Java path set in Environment Variable Section



Solution: Set correct JAVA_HOME Path



Steps->Environment Variable Setting (My Comp-Right Click ->Properties->Env Variable->Advance Tab ->Variable)



Create new JAVA_HOME Environment Variable.



JAVA_HOME .;C:Program Files (x86)Javajdk1.6.0_14



Set JAVA_HOME variable in PATH Variable section.



PATH %JAVA_HOME%bin



Set JAVA_HOME variable in CLASSPATH Variable



CLASSPATH %JAVA_HOME%jrelib



Restart System



Verify all variable



echo %CLASSPATH%



echo %JAVA_HOME%



echo %PATH%



Compile & Run the program






share|improve this answer























  • Did you even read the question? He isn't writing any code.
    – user93353
    Oct 2 '13 at 13:40










  • @user93353 that's why i finally mentioned Check the classpath too, now i edited with steps for how to check the classpath.
    – Yasa
    Oct 3 '13 at 4:49


















0














If you using this lib org.apache.commons.logging.LogFactory then you should probably initialize log according to classes @ coding



Example



private static Log LOG = LogFactory.getLog(ClassName.class);



It has .class extension when compile you should make sure whether that class created or not else it will give an exception, i guess



Check the classpath too



Issue-java.lang.NoClassDefFoundError



Root Cause: Incorrect Java path set in Environment Variable Section



Solution: Set correct JAVA_HOME Path



Steps->Environment Variable Setting (My Comp-Right Click ->Properties->Env Variable->Advance Tab ->Variable)



Create new JAVA_HOME Environment Variable.



JAVA_HOME .;C:Program Files (x86)Javajdk1.6.0_14



Set JAVA_HOME variable in PATH Variable section.



PATH %JAVA_HOME%bin



Set JAVA_HOME variable in CLASSPATH Variable



CLASSPATH %JAVA_HOME%jrelib



Restart System



Verify all variable



echo %CLASSPATH%



echo %JAVA_HOME%



echo %PATH%



Compile & Run the program






share|improve this answer























  • Did you even read the question? He isn't writing any code.
    – user93353
    Oct 2 '13 at 13:40










  • @user93353 that's why i finally mentioned Check the classpath too, now i edited with steps for how to check the classpath.
    – Yasa
    Oct 3 '13 at 4:49
















0












0








0






If you using this lib org.apache.commons.logging.LogFactory then you should probably initialize log according to classes @ coding



Example



private static Log LOG = LogFactory.getLog(ClassName.class);



It has .class extension when compile you should make sure whether that class created or not else it will give an exception, i guess



Check the classpath too



Issue-java.lang.NoClassDefFoundError



Root Cause: Incorrect Java path set in Environment Variable Section



Solution: Set correct JAVA_HOME Path



Steps->Environment Variable Setting (My Comp-Right Click ->Properties->Env Variable->Advance Tab ->Variable)



Create new JAVA_HOME Environment Variable.



JAVA_HOME .;C:Program Files (x86)Javajdk1.6.0_14



Set JAVA_HOME variable in PATH Variable section.



PATH %JAVA_HOME%bin



Set JAVA_HOME variable in CLASSPATH Variable



CLASSPATH %JAVA_HOME%jrelib



Restart System



Verify all variable



echo %CLASSPATH%



echo %JAVA_HOME%



echo %PATH%



Compile & Run the program






share|improve this answer














If you using this lib org.apache.commons.logging.LogFactory then you should probably initialize log according to classes @ coding



Example



private static Log LOG = LogFactory.getLog(ClassName.class);



It has .class extension when compile you should make sure whether that class created or not else it will give an exception, i guess



Check the classpath too



Issue-java.lang.NoClassDefFoundError



Root Cause: Incorrect Java path set in Environment Variable Section



Solution: Set correct JAVA_HOME Path



Steps->Environment Variable Setting (My Comp-Right Click ->Properties->Env Variable->Advance Tab ->Variable)



Create new JAVA_HOME Environment Variable.



JAVA_HOME .;C:Program Files (x86)Javajdk1.6.0_14



Set JAVA_HOME variable in PATH Variable section.



PATH %JAVA_HOME%bin



Set JAVA_HOME variable in CLASSPATH Variable



CLASSPATH %JAVA_HOME%jrelib



Restart System



Verify all variable



echo %CLASSPATH%



echo %JAVA_HOME%



echo %PATH%



Compile & Run the program







share|improve this answer














share|improve this answer



share|improve this answer








edited Oct 3 '13 at 3:28

























answered Oct 2 '13 at 9:12









Yasa

192119




192119












  • Did you even read the question? He isn't writing any code.
    – user93353
    Oct 2 '13 at 13:40










  • @user93353 that's why i finally mentioned Check the classpath too, now i edited with steps for how to check the classpath.
    – Yasa
    Oct 3 '13 at 4:49




















  • Did you even read the question? He isn't writing any code.
    – user93353
    Oct 2 '13 at 13:40










  • @user93353 that's why i finally mentioned Check the classpath too, now i edited with steps for how to check the classpath.
    – Yasa
    Oct 3 '13 at 4:49


















Did you even read the question? He isn't writing any code.
– user93353
Oct 2 '13 at 13:40




Did you even read the question? He isn't writing any code.
– user93353
Oct 2 '13 at 13:40












@user93353 that's why i finally mentioned Check the classpath too, now i edited with steps for how to check the classpath.
– Yasa
Oct 3 '13 at 4:49






@user93353 that's why i finally mentioned Check the classpath too, now i edited with steps for how to check the classpath.
– Yasa
Oct 3 '13 at 4:49




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f19125410%2fjava-lang-noclassdeffounderror-org-apache-commons-logging-logfactory%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Sphinx de Gizeh

Dijon

Get global maximum slope