You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Debapriya Roy <de...@TechMahindra.com> on 2011/05/19 09:17:00 UTC

Problem with running WordCount example

Hi,

While running the WordCount.java file from hadoop, faced the following error:

Exception in thread "main" java.io.IOException: Error opening job jar: /user/droy/wordcount_hdfs/WordCount.jar
        at org.apache.hadoop.util.RunJar.main(RunJar.java:90)
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:114)
        at java.util.jar.JarFile.<init>(JarFile.java:133)
        at java.util.jar.JarFile.<init>(JarFile.java:70)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:88)


Here the hdfs directory is : /user/droy/wordcount_hdfs/


Please advise.


Thanks and Regards,
Debapriya Roy  | ASM(NPR) | Tech  Mahindra
5th Floor,  Techno India Building, Sector-V, Saltlake , Kolkata-700091, INDIA
* Office: (033)40028100  |  Extn:  7509
Email: debapriya@techmahindra.com<BL...@techmahindra.com>
www.techmahindra.com<BLOCKED::blocked::http://www.techmahindra.com/>


============================================================================================================================Disclaimer:  This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.============================================================================================================================

Re: Problem with running WordCount example

Posted by Ferdy Galema <fe...@kalooga.com>.
You should not put the application jar itself on the hdfs (in this case 
hadoop-*-examples.jar).

If you run the following command, <in> and <out> are directories on the 
configured filesystem (which is DFS most of the times):
bin/hadoop jar hadoop-*-examples.jar wordcount <in> <out>


On 05/19/2011 09:17 AM, Debapriya Roy wrote:
> Hi,
>
> While running the WordCount.java file from hadoop, faced the following error:
>
> Exception in thread "main" java.io.IOException: Error opening job jar: /user/droy/wordcount_hdfs/WordCount.jar
>          at org.apache.hadoop.util.RunJar.main(RunJar.java:90)
> 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:114)
>          at java.util.jar.JarFile.<init>(JarFile.java:133)
>          at java.util.jar.JarFile.<init>(JarFile.java:70)
>          at org.apache.hadoop.util.RunJar.main(RunJar.java:88)
>
>
> Here the hdfs directory is : /user/droy/wordcount_hdfs/
>
>
> Please advise.
>
>
> Thanks and Regards,
> Debapriya Roy  | ASM(NPR) | Tech  Mahindra
> 5th Floor,  Techno India Building, Sector-V, Saltlake , Kolkata-700091, INDIA
> * Office: (033)40028100  |  Extn:  7509
> Email: debapriya@techmahindra.com<BL...@techmahindra.com>
> www.techmahindra.com<BLOCKED::blocked::http://www.techmahindra.com/>
>
>
> ============================================================================================================================Disclaimer:  This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at<a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a>  externally and<a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a>  internally within Tech Mahindra.============================================================================================================================
>