I am getting following error while trying to run jar through hadoop command prompt
Exception in thread "main" java.io.IOException: Error opening job jar: /tmp/NewJar.jar at org.apache.hadoop.util.RunJar.main(RunJar.java:124)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:136)
at java.util.jar.JarFile.<init>(JarFile.java:73)
at org.apache.hadoop.util.RunJar.main(RunJar.java:122)
Most probable causes :
- Incorrect path of the jar.
- Improper permissions on the folder where Hadoop is trying to run the jar file.
Please make sure you have specified the correct path and you have proper directory permissions.
My jar file has the permission rw-r--r-- by default. I changed it to rwx-rwx-rwx through command
chmod 777 my_jar.jar
. And the error gone and I ran the program sucessfully.