pig and Hadoop error : looks like java version issue
3 Answer(s)
DeZyre Support
hi Praveen,
Is this the first time you are getting JAva error? can you type the following commands and provide the output:
1) whereis java
2) which java
3) java -version
4)
/usr/lib/hadoop/bin/hadoop: line 139: exec: /usr/lib/jvm/java-6-sun-1.6.0.24//bin/
Looks like Java was removed mistakenly from the VM.
Thanks
Mar 18 2015 09:19 AM
Is this the first time you are getting JAva error? can you type the following commands and provide the output:
1) whereis java
2) which java
3) java -version
4)
/usr/lib/hadoop/bin/hadoop: line 139: exec: /usr/lib/jvm/java-6-sun-1.6.0.24//bin/
Looks like Java was removed mistakenly from the VM.
Thanks
Praveen
Hi Please find the result for the commands below,
[cloudera@localhost ~]$ whereis java
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java
[cloudera@localhost ~]$ which java
/usr/java/jdk1.6.0_32/bin/java
[cloudera@localhost ~]$ java -version
java version "1.6.0_32"
Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode)
[cloudera@localhost ~]$
my error:
[cloudera@localhost ~]$ hadoop fs -ls
/usr/lib/hadoop/bin/hadoop: line 139: /usr/lib/jvm/java-6-sun-1.6.0.24/bin/java: No such file or directory
/usr/lib/hadoop/bin/hadoop: line 139: exec: /usr/lib/jvm/java-6-sun-1.6.0.24/bin/java: cannot execute: No such file or directory
NOTE: this is first time i installed on a laptop and followed your option 1 document "Windows - Cloudera Hadoop Installation - CDH4 (Recommended)" after i didn install anything in VM . just opened the terminal and fired the command and it is giving the error.
Please help me.
Mar 19 2015 01:32 AM
[cloudera@localhost ~]$ whereis java
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java
[cloudera@localhost ~]$ which java
/usr/java/jdk1.6.0_32/bin/java
[cloudera@localhost ~]$ java -version
java version "1.6.0_32"
Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode)
[cloudera@localhost ~]$
my error:
[cloudera@localhost ~]$ hadoop fs -ls
/usr/lib/hadoop/bin/hadoop: line 139: /usr/lib/jvm/java-6-sun-1.6.0.24/bin/java: No such file or directory
/usr/lib/hadoop/bin/hadoop: line 139: exec: /usr/lib/jvm/java-6-sun-1.6.0.24/bin/java: cannot execute: No such file or directory
NOTE: this is first time i installed on a laptop and followed your option 1 document "Windows - Cloudera Hadoop Installation - CDH4 (Recommended)" after i didn install anything in VM . just opened the terminal and fired the command and it is giving the error.
Please help me.
Abhijit-Dezyre Support
May 25 2016 07:08 AM
Hi Praveen,
Looks like your java has certain issue.
To resolve the issue:
1. Enter the command - ls /usr/java/
2. You will get the folder name like - jdk1.6.0.xx (where is xx is version number)
- Enter the following command - export JAVA_HOME=/usr/java/jdk1.6.0.xx
3. Now copy the same jdk-1.6.0.xx folder at /usr/lib/jvm/
- Command - sudo cp -r /usr/java/jdk1.6.0.xx /usr/lib/jvm/
4. Update the bash
- Command - exec bash
5. Try the command you were trying.
Hope this helps.
Thanks.