hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravi Prakash <ravihad...@gmail.com>
Subject Re: Cannot start yarn daemons
Date Mon, 09 Jan 2012 16:32:05 GMT

Clearly the jar file containing the class
"org/apache/hadoop/conf/Configuration" is not available on the CLASSPATH.
Did you build hadoop properly? The way I would usually check this is:
1. I have a shell script findclass

if [ -z $LOOK_FOR ]; then
        echo -e "Usage: findclass <classname>\n Will find . -name *.jar and
jar tvf them"

for i in `find . -name "*.jar"`
  echo "Looking in $i ..."
  jar tvf $i | grep $LOOK_FOR > /dev/null
  if [ $? == 0 ]
    echo "==> Found \"$LOOK_FOR\" in $i"

If you run findclass org/apache/hadoop/conf/Configuration, it will tell you
the list of jars in subdirectories which contain that class.

2. Check that atleast one of the jars listed in the CLASSPATH printed out
when you run the yarn-daemon.sh is one which contains the above class. This
in your case is hadoop-common*.jar (e.g. hadoop-common-0.23.1-SNAPSHOT.jar)


On Mon, Jan 9, 2012 at 2:23 AM, raghavendhra rahul <
raghavendhrarahul@gmail.com> wrote:

> Hi,
>   I am trying to install hadoop 0.23.1 SNAPSHOT. while starting yarn
> daemons.sh it shows the following error
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/hadoop/conf/Configuration
> Caused by: java.lang.ClassNotFoundException:
> org.apache.hadoop.conf.Configuration
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> Could not find the main class:
> org.apache.hadoop.yarn.server.resourcemanager.ResourceManager. Program will
> exit.

View raw message