views:

191

answers:

1

hi, When I try to format the namenode or even start it I'm getting the below error. What should be done??

$ bin/hadoop namenode -format

Exception in thread "main" java.lang.NoClassDefFoundError:
Caused by: java.lang.ClassNotFoundException:
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
.  Program will exit.in class:
+1  A: 

It seems you did not put the hadoop jar on your classpath, check whether there is a hadoop-version.jar in the lib folder.

zjffdu
Yes the jar file is there. Still it returns the same error.
Shweta