|
|
-
main" java.lang.UnsupportedClassVersionError: Bad version number in .class
Mohit Anchlia 2010-08-31, 00:51
Hi,
I am running some basic setup and test to know about hadoop. When I try to start nodes I get this error. I am already using java 1.6. Can someone please help?
# echo $JAVA_HOME /root/jdk1.6.0_21/
# java -version java version "1.6.0_21" Java(TM) SE Runtime Environment (build 1.6.0_21-b06) Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode)
[root@qysprfefitbap06 hadoop-0.20.2]# ./bin/start-all.sh starting namenode, logging to /root/hadoop/hadoop-0.20.2/bin/../logs/hadoop-root-namenode-qysprfefitbap06.data.ieptc.intuit.net.out localhost: localhost: ******************************************************************************** localhost: This is a private computer system containing information that is proprietary localhost: and confidential to the owner of the system. only individuals or entities localhost: authorized by the owner of the system are allowed to access or use the system. localhost: Any unauthorized access or use of the system or information is strictly localhost: prohibited. localhost: localhost: All violators will be prosecuted to the fullest extent permitted by law. localhost: ******************************************************************************** localhost: localhost: starting datanode, logging to /root/hadoop/hadoop-0.20.2/bin/../logs/hadoop-root-datanode-qysprfefitbap06.data.ieptc.intuit.net.out localhost: Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file localhost: at java.lang.ClassLoader.defineClass1(Native Method) localhost: at java.lang.ClassLoader.defineClass(ClassLoader.java:620) localhost: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) localhost: at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) localhost: at java.net.URLClassLoader.access$100(URLClassLoader.java:56) localhost: at java.net.URLClassLoader$1.run(URLClassLoader.java:195) localhost: at java.security.AccessController.doPrivileged(Native Method) localhost: at java.net.URLClassLoader.findClass(URLClassLoader.java:188) localhost: at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
-
Re: main" java.lang.UnsupportedClassVersionError: Bad version number in .class
Hemanth Yamijala 2010-08-31, 02:23
Hi,
Can you please confirm if you've set JAVA_HOME in <conf-dir>/hadoop-env.sh on all the nodes ?
Thanks Hemanth
On Tue, Aug 31, 2010 at 6:21 AM, Mohit Anchlia <[EMAIL PROTECTED]> wrote: > Hi, > > I am running some basic setup and test to know about hadoop. When I > try to start nodes I get this error. I am already using java 1.6. Can > someone please help? > > # echo $JAVA_HOME > /root/jdk1.6.0_21/ > > # java -version > java version "1.6.0_21" > Java(TM) SE Runtime Environment (build 1.6.0_21-b06) > Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode) > > [root@qysprfefitbap06 hadoop-0.20.2]# ./bin/start-all.sh > starting namenode, logging to > /root/hadoop/hadoop-0.20.2/bin/../logs/hadoop-root-namenode-qysprfefitbap06.data.ieptc.intuit.net.out > localhost: > localhost: ******************************************************************************** > localhost: This is a private computer system containing information > that is proprietary > localhost: and confidential to the owner of the system. only > individuals or entities > localhost: authorized by the owner of the system are allowed to access > or use the system. > localhost: Any unauthorized access or use of the system or information > is strictly > localhost: prohibited. > localhost: > localhost: All violators will be prosecuted to the fullest extent > permitted by law. > localhost: ******************************************************************************** > localhost: > localhost: starting datanode, logging to > /root/hadoop/hadoop-0.20.2/bin/../logs/hadoop-root-datanode-qysprfefitbap06.data.ieptc.intuit.net.out > localhost: Exception in thread "main" > java.lang.UnsupportedClassVersionError: Bad version number in .class > file > localhost: at java.lang.ClassLoader.defineClass1(Native Method) > localhost: at java.lang.ClassLoader.defineClass(ClassLoader.java:620) > localhost: at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) > localhost: at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) > localhost: at java.net.URLClassLoader.access$100(URLClassLoader.java:56) > localhost: at java.net.URLClassLoader$1.run(URLClassLoader.java:195) > localhost: at java.security.AccessController.doPrivileged(Native Method) > localhost: at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > localhost: at java.lang.ClassLoader.loadClass(ClassLoader.java:306) >
-
Re: main" java.lang.UnsupportedClassVersionError: Bad version number in .class
Mohit Anchlia 2010-08-31, 19:57
It wasn't set. But it was set on the shell I was trying to startup the nodes. Is that different?
I set it in hadoop-env.sh and it worked! But don't understand why it has to be in there when it was already set on the current shell. Oh, is it because it ssh?
On Mon, Aug 30, 2010 at 7:23 PM, Hemanth Yamijala <[EMAIL PROTECTED]> wrote: > Hi, > > Can you please confirm if you've set JAVA_HOME in > <conf-dir>/hadoop-env.sh on all the nodes ? > > Thanks > Hemanth > > On Tue, Aug 31, 2010 at 6:21 AM, Mohit Anchlia <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I am running some basic setup and test to know about hadoop. When I >> try to start nodes I get this error. I am already using java 1.6. Can >> someone please help? >> >> # echo $JAVA_HOME >> /root/jdk1.6.0_21/ >> >> # java -version >> java version "1.6.0_21" >> Java(TM) SE Runtime Environment (build 1.6.0_21-b06) >> Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode) >> >> [root@qysprfefitbap06 hadoop-0.20.2]# ./bin/start-all.sh >> starting namenode, logging to >> /root/hadoop/hadoop-0.20.2/bin/../logs/hadoop-root-namenode-qysprfefitbap06.data.ieptc.intuit.net.out >> localhost: >> localhost: ******************************************************************************** >> localhost: This is a private computer system containing information >> that is proprietary >> localhost: and confidential to the owner of the system. only >> individuals or entities >> localhost: authorized by the owner of the system are allowed to access >> or use the system. >> localhost: Any unauthorized access or use of the system or information >> is strictly >> localhost: prohibited. >> localhost: >> localhost: All violators will be prosecuted to the fullest extent >> permitted by law. >> localhost: ******************************************************************************** >> localhost: >> localhost: starting datanode, logging to >> /root/hadoop/hadoop-0.20.2/bin/../logs/hadoop-root-datanode-qysprfefitbap06.data.ieptc.intuit.net.out >> localhost: Exception in thread "main" >> java.lang.UnsupportedClassVersionError: Bad version number in .class >> file >> localhost: at java.lang.ClassLoader.defineClass1(Native Method) >> localhost: at java.lang.ClassLoader.defineClass(ClassLoader.java:620) >> localhost: at >> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) >> localhost: at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) >> localhost: at java.net.URLClassLoader.access$100(URLClassLoader.java:56) >> localhost: at java.net.URLClassLoader$1.run(URLClassLoader.java:195) >> localhost: at java.security.AccessController.doPrivileged(Native Method) >> localhost: at java.net.URLClassLoader.findClass(URLClassLoader.java:188) >> localhost: at java.lang.ClassLoader.loadClass(ClassLoader.java:306) >> >
-
Re: main" java.lang.UnsupportedClassVersionError: Bad version number in .class
Chaitanya Krishna 2010-09-01, 02:00
On Wed, Sep 1, 2010 at 1:27 AM, Mohit Anchlia <[EMAIL PROTECTED]>wrote:
> It wasn't set. But it was set on the shell I was trying to startup the > nodes. Is that different? > > I set it in hadoop-env.sh and it worked! But don't understand why it > has to be in there when it was already set on the current shell. Oh, > is it because it ssh? >
Yes. It does ssh, due to which setting it for the shell's session doesnt work. However, I believe adding java's path to $PATH might also work (not sure though). Thanks Chaitanya
> > On Mon, Aug 30, 2010 at 7:23 PM, Hemanth Yamijala <[EMAIL PROTECTED]> > wrote: > > Hi, > > > > Can you please confirm if you've set JAVA_HOME in > > <conf-dir>/hadoop-env.sh on all the nodes ? > > > > Thanks > > Hemanth > > > > On Tue, Aug 31, 2010 at 6:21 AM, Mohit Anchlia <[EMAIL PROTECTED]> > wrote: > >> Hi, > >> > >> I am running some basic setup and test to know about hadoop. When I > >> try to start nodes I get this error. I am already using java 1.6. Can > >> someone please help? > >> > >> # echo $JAVA_HOME > >> /root/jdk1.6.0_21/ > >> > >> # java -version > >> java version "1.6.0_21" > >> Java(TM) SE Runtime Environment (build 1.6.0_21-b06) > >> Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode) > >> > >> [root@qysprfefitbap06 hadoop-0.20.2]# ./bin/start-all.sh > >> starting namenode, logging to > >> > /root/hadoop/hadoop-0.20.2/bin/../logs/hadoop-root-namenode-qysprfefitbap06.data.ieptc.intuit.net.out > >> localhost: > >> localhost: > ******************************************************************************** > >> localhost: This is a private computer system containing information > >> that is proprietary > >> localhost: and confidential to the owner of the system. only > >> individuals or entities > >> localhost: authorized by the owner of the system are allowed to access > >> or use the system. > >> localhost: Any unauthorized access or use of the system or information > >> is strictly > >> localhost: prohibited. > >> localhost: > >> localhost: All violators will be prosecuted to the fullest extent > >> permitted by law. > >> localhost: > ******************************************************************************** > >> localhost: > >> localhost: starting datanode, logging to > >> > /root/hadoop/hadoop-0.20.2/bin/../logs/hadoop-root-datanode-qysprfefitbap06.data.ieptc.intuit.net.out > >> localhost: Exception in thread "main" > >> java.lang.UnsupportedClassVersionError: Bad version number in .class > >> file > >> localhost: at java.lang.ClassLoader.defineClass1(Native Method) > >> localhost: at > java.lang.ClassLoader.defineClass(ClassLoader.java:620) > >> localhost: at > >> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) > >> localhost: at > java.net.URLClassLoader.defineClass(URLClassLoader.java:260) > >> localhost: at > java.net.URLClassLoader.access$100(URLClassLoader.java:56) > >> localhost: at > java.net.URLClassLoader$1.run(URLClassLoader.java:195) > >> localhost: at java.security.AccessController.doPrivileged(Native > Method) > >> localhost: at > java.net.URLClassLoader.findClass(URLClassLoader.java:188) > >> localhost: at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > >> > > >
|
|