1-844-696-6465 (US)        +91 77600 44484        help@dezyre.com

There is an error "Error opening Jar" that hadoop is throwing when i try to run a jar job

I executed the below command and it throws this error. I created the jar from eclipse itself. Please help as this is preventing me from running my first program on the VM [it runs fine on eclipse]

[cloudera@localhost wordcount]$ hadoop jar dezyre/wordcount.jar
WordCount dezyre/input.txt output

Exception in thread "main" java.io.IOException: Error opening job jar: dezyre/wordcount.jar
at org.apache.hadoop.util.RunJar.main(RunJar.java:135)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:127)
at java.util.jar.JarFile.(JarFile.java:135)
at java.util.jar.JarFile.(JarFile.java:72)
at org.apache.hadoop.util.RunJar.main(RunJar.java:133)

5 Answer(s)


hi Sree,

Please check the name of the zip file, you have not provided complete path of jar. modify it as below
hadoop jar /home/cloudera/dezyre/wordcount.jar WordCount dezyre/input.txt output


i provided the complete path and it still doesn't work. Should the jar be rwxrwxrwx? my Jar is only -rw-rw-rw. I am not able to make it executable, is that the reason for this issue?


I would check the path and name of the jar file ....java is case sensitive so you may want to recheck the path and name of the jar file .....It may not seem like related to execute privilege ... Also, I am new to java ... just trying to help out here ....Hope this helps ....

Good luck....


Hi Sree

Did this work finally for you?

For me the jar was working fine earlier but all off a sudden I am getting the same issue and surprisingly with the same old jar. I tried creating many new jars also after that but still result is same.

What did you finally do to make this work?


Hi Sree,

I am also facing the same problem as you mentioned above. While running the jar file from VM...it is throwing IO Exception

Exception in thread "main" java.io.IOException: Error opening job jar: mr/Mapreduce.jar

Below is the command I executed

hadoop jar mr/Mapreduce.jar DistinctValuesExample1 mr/la_series.txt mr/outp

Also I have noticed that jar file and input file have -rw-r--r-- permission which I am unable to change.

Could you please help me here??

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)