hadoop2 - Exception in thread "main" while formatting namenode in hadoop -


satya@ubuntu:~/hadoop/bin$ hadoop namenode -format 

deprecated: use of script execute hdfs command deprecated. instead use hdfs command it.

exception in thread "main" java.lang.unsupportedclassversionerror: org/apache/hadoop/hdfs/server/namenode/namenode : unsupported major.minor version 51.0         @ java.lang.classloader.defineclass1(native method)         @ java.lang.classloader.defineclasscond(classloader.java:631)         @ java.lang.classloader.defineclass(classloader.java:615)         @ java.security.secureclassloader.defineclass(secureclassloader.java:141)         @ java.net.urlclassloader.defineclass(urlclassloader.java:283)         @ java.net.urlclassloader.access$000(urlclassloader.java:58)         @ java.net.urlclassloader$1.run(urlclassloader.java:197)         @ java.security.accesscontroller.doprivileged(native method)         @ java.net.urlclassloader.findclass(urlclassloader.java:190)         @ java.lang.classloader.loadclass(classloader.java:306)         @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301)         @ java.lang.classloader.loadclass(classloader.java:247) not find main class: org.apache.hadoop.hdfs.server.namenode.namenode.  program exit. 

this error (unsupported major.minor version) appears because of using higher jdk during compile time , lower jdk during runtime. in case 51 corresponds jdk 7 (for more version mappings visit this link), indicates whatever jvm 1.6 runtime loaded, meant jvm 1.7. try using jdk 1.7 , set using java_home environment variable in hadoop-env.sh.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -