AnsweredAssumed Answered

Problem starting hadoop

Question asked by preeti on Feb 15, 2013
Latest reply on Feb 17, 2013 by preeti
I am using hadoop-0.22 and my log4j.prop has

log4j.appender.EventCounter=org.apache.hadoop.metrics.jvm.EventCounter

but when I try to start the services it shows error saying "java.lang.ClassNotFoundException: org.apache.hadoop.log.metrics.EventCounter". I have hadoop-1.0.4 on the same machine.
<pre>
bash-3.2# ./start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-mapred.sh
starting namenode, logging to /usr/local/hadoop/hadoop-0.22.0/bin/../logs/hadoop-root-namenode-Preetis-MacBook-Pro.local.out
log4j:ERROR Could not instantiate class [org.apache.hadoop.log.metrics.EventCounter].
java.lang.ClassNotFoundException: org.apache.hadoop.log.metrics.EventCounter
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
localhost: starting datanode, logging to /usr/local/hadoop/hadoop-0.22.0/bin/../logs/hadoop-root-datanode-Preetis-MacBook-Pro.local.out
localhost: log4j:ERROR Could not instantiate class [org.apache.hadoop.log.metrics.EventCounter].
localhost: java.lang.ClassNotFoundException: org.apache.hadoop.log.metrics.EventCounter
localhost:  at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
localhost:  at java.security.AccessController.doPrivileged(Native Method)
localhost:  at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
localhost:  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
localhost:  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
localhost:  at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
localhost:  at java.lang.Class.forName0(Native Method)
localhost:  at java.lang.Class.forName(Class.java:169)
localhost: starting secondarynamenode, logging to /usr/local/hadoop/hadoop-0.22.0/bin/../logs/hadoop-root-secondarynamenode-Preetis-MacBook-Pro.local.out
localhost: log4j:ERROR Could not instantiate class [org.apache.hadoop.log.metrics.EventCounter].
localhost: java.lang.ClassNotFoundException: org.apache.hadoop.log.metrics.EventCounter
localhost:  at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
localhost:  at java.security.AccessController.doPrivileged(Native Method)
localhost:  at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
localhost:  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
localhost:  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
localhost:  at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
localhost:  at java.lang.Class.forName0(Native Method)
localhost:  at java.lang.Class.forName(Class.java:169)

Outcomes