Error while trying to run jar in Hadoop

2019-08-30 23:36发布

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)

标签: hadoop jar
2条回答
放我归山
2楼-- · 2019-08-30 23:42

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.

查看更多
够拽才男人
3楼-- · 2019-08-31 00:02

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.

查看更多
登录 后发表回答