Error while trying to run jar in Hadoop

半腔热情 提交于 2019-12-24 15:09:03

问题


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)

回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/19093327/error-while-trying-to-run-jar-in-hadoop

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!