<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Not Valid Jar Error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174548#M136811</link>
    <description>&lt;P&gt;Hi .&lt;/P&gt;&lt;P&gt;While running wordcount jar I am getting error"Not a valid jar" &lt;/P&gt;&lt;P&gt;[hdfs@sandbox /]$ hadoop fs -ls&lt;/P&gt;&lt;P&gt;
Found 8 items&lt;/P&gt;&lt;P&gt;
drwx------   - root  hdfs          0 2016-08-12 00:21 .Trash&lt;/P&gt;&lt;P&gt;
drwxr-xr-x   - root  hdfs          0 2016-08-01 21:31 .hiveJars&lt;/P&gt;&lt;P&gt;
drwx------   - hdfs  hdfs          0 2016-08-12 19:42 .staging&lt;/P&gt;&lt;P&gt; -rw-r--r--   3 admin hdfs       1024 2016-08-14 19:24 count.txt&lt;/P&gt;&lt;P&gt;
drwxr-xr-x   - hdfs  hdfs          0 2016-08-12 18:38 emp&lt;/P&gt;&lt;P&gt;
-rw-r--r--   3 admin hdfs       4096 2016-08-14 19:24 wordcount.jar &lt;/P&gt;&lt;P&gt;[hdfs@sandbox /]$ hadoop jar wordcount.jar WordCount count.txt wordcountoutput&lt;/P&gt;&lt;P&gt;                        WARNING: Use "yarn jar" to launch YARN applications.
Not a valid JAR: /wordcount.jar&lt;/P&gt;&lt;P&gt;I compiled my program with hadoop-common-2.3.0.jar&lt;/P&gt;&lt;P&gt;Hadoop and Java version as below&lt;/P&gt;&lt;P&gt;Hadoop 2.7.1.2.3.2.0-2950&lt;/P&gt;&lt;P&gt;java version "1.7.0_91"&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2016 02:39:37 GMT</pubDate>
    <dc:creator>TechGuy</dc:creator>
    <dc:date>2016-08-15T02:39:37Z</dc:date>
    <item>
      <title>Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174548#M136811</link>
      <description>&lt;P&gt;Hi .&lt;/P&gt;&lt;P&gt;While running wordcount jar I am getting error"Not a valid jar" &lt;/P&gt;&lt;P&gt;[hdfs@sandbox /]$ hadoop fs -ls&lt;/P&gt;&lt;P&gt;
Found 8 items&lt;/P&gt;&lt;P&gt;
drwx------   - root  hdfs          0 2016-08-12 00:21 .Trash&lt;/P&gt;&lt;P&gt;
drwxr-xr-x   - root  hdfs          0 2016-08-01 21:31 .hiveJars&lt;/P&gt;&lt;P&gt;
drwx------   - hdfs  hdfs          0 2016-08-12 19:42 .staging&lt;/P&gt;&lt;P&gt; -rw-r--r--   3 admin hdfs       1024 2016-08-14 19:24 count.txt&lt;/P&gt;&lt;P&gt;
drwxr-xr-x   - hdfs  hdfs          0 2016-08-12 18:38 emp&lt;/P&gt;&lt;P&gt;
-rw-r--r--   3 admin hdfs       4096 2016-08-14 19:24 wordcount.jar &lt;/P&gt;&lt;P&gt;[hdfs@sandbox /]$ hadoop jar wordcount.jar WordCount count.txt wordcountoutput&lt;/P&gt;&lt;P&gt;                        WARNING: Use "yarn jar" to launch YARN applications.
Not a valid JAR: /wordcount.jar&lt;/P&gt;&lt;P&gt;I compiled my program with hadoop-common-2.3.0.jar&lt;/P&gt;&lt;P&gt;Hadoop and Java version as below&lt;/P&gt;&lt;P&gt;Hadoop 2.7.1.2.3.2.0-2950&lt;/P&gt;&lt;P&gt;java version "1.7.0_91"&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 02:39:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174548#M136811</guid>
      <dc:creator>TechGuy</dc:creator>
      <dc:date>2016-08-15T02:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174549#M136812</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/2754/techguy9912.html" nodeid="2754"&gt;@Tech Guy&lt;/A&gt;&lt;P&gt;Your jar appears to be in hdfs. You cannot have jar inside hdfs. It needs to be in your local file system. Put it in local file system and run again. It should work.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 08:34:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174549#M136812</guid>
      <dc:creator>mqureshi</dc:creator>
      <dc:date>2016-08-15T08:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174550#M136813</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/2754/techguy9912.html"&gt;Tech Guy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The message is misleading. You need to provide a path for your input and output files and make sure that your user has privileges on those folders. You should also try to place the jar locally as @&lt;A href="https://community.hortonworks.com/users/10969/mqureshi.html"&gt;mqureshi&lt;/A&gt; suggested, which is probably the easiest, otherwise you would need to specify a full hdfs path to the jar file.&lt;/P&gt;&lt;P&gt;For example, you could run the command as it follows:&lt;/P&gt;&lt;P&gt;hadoop jar /home/joe/wordcount.jar WordCount /user/joe/wordcount/input /user/joe/wordcount/output&lt;/P&gt;&lt;P&gt;If the response is helpful, vote/accept answer.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 08:35:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174550#M136813</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-08-15T08:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174551#M136814</link>
      <description>&lt;P&gt;It can be in hdfs or local fs. You just need to have them referenced properly and have the proper privileges.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 08:37:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174551#M136814</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-08-15T08:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174552#M136815</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/3486/cstanca.html" nodeid="3486"&gt;@Constantin Stanca&lt;/A&gt;, &lt;A rel="user" href="https://community.cloudera.com/users/2754/techguy9912.html" nodeid="2754"&gt;@Tech Guy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am pretty sure, the jar file is supposed to be in local file system. Unless, you are aware of things getting changed in new versions. Please see the following link.&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/20333135/how-to-execute-hadoop-jar-from-hdfs-filesystem" target="_blank"&gt;http://stackoverflow.com/questions/20333135/how-to-execute-hadoop-jar-from-hdfs-filesystem&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 11:46:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174552#M136815</guid>
      <dc:creator>mqureshi</dc:creator>
      <dc:date>2016-08-15T11:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174553#M136816</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/10969/mqureshi.html"&gt;@mqureshi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/10969/mqureshi.html"&gt;&lt;/A&gt;Technically, you are correct. Since I did not know the reason for storing the jar file in hdfs, I wanted to provide a "either way" solution. For example, in large development teams, I used a trick for cases where needed to store the jar files in HDFS as such they can be easily accessed between multiple clients including Hive as UDFs. It was something like in the reference you provided, but you are correct, it will still pick it from the local file system, however, it will provide a centralized location which can be used as a target for build artifacts and shared across multiple developers in a team. &lt;/P&gt;&lt;PRE&gt;hadoop fs -copyToLocal hdfs:///home/usr/jar/myjar.jar /tmp/myjar.jar &amp;amp;&amp;amp; hadoop jar /tmp/myjar.jar com.test.TestMain &lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Aug 2016 04:10:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174553#M136816</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-08-16T04:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174554#M136817</link>
      <description>&lt;P&gt;@Constantin Stanca, @mqureshi, &lt;/P&gt;&lt;P&gt;I tried to run in local file system as below&lt;/P&gt;&lt;P&gt;[hdfs@sandbox LogFiles]$ hadoop jar wordcount.jar WordCount count.txt /Out&lt;/P&gt;&lt;P&gt;Not valid error gone but got "&lt;STRONG&gt;Unsupported major.minor version 52.0"  Error. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I compiled my program with hadoop-common-2.7.1.jar&lt;/P&gt;&lt;P&gt;Hadoop and Java version as below&lt;/P&gt;&lt;P&gt;Hadoop 2.7.1.2.3.2.0-2950&lt;/P&gt;&lt;P&gt;java version "1.7.0_91"&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 04:23:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174554#M136817</guid>
      <dc:creator>TechGuy</dc:creator>
      <dc:date>2016-08-17T04:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174555#M136818</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10969/mqureshi.html" nodeid="10969"&gt;@mqureshi&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I tried to run in local file system as below&lt;/P&gt;&lt;P&gt;[hdfs@sandbox LogFiles]$ hadoop jar wordcount.jar WordCount count.txt /Out&lt;/P&gt;&lt;P&gt;Not valid error gone but got "&lt;STRONG&gt;Unsupported major.minor version 52.0" Error.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I compiled my program with hadoop-common-2.7.1.jar&lt;/P&gt;&lt;P&gt;Hadoop and Java version as below&lt;/P&gt;&lt;P&gt;Hadoop 2.7.1.2.3.2.0-2950&lt;/P&gt;&lt;P&gt;java version "1.7.0_91"&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 10:56:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174555#M136818</guid>
      <dc:creator>TechGuy</dc:creator>
      <dc:date>2016-08-17T10:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174556#M136819</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/2754/techguy9912.html" nodeid="2754"&gt;@Tech Guy&lt;/A&gt;&lt;P&gt;your latest error is just because of incompatible java version. According to this &lt;A href="https://en.wikipedia.org/wiki/Java_class_file"&gt;link&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;major version number of the class file format being used.&lt;/P&gt;&lt;P&gt;Java SE 9 = 53 (0x35 hex),&lt;SUP&gt;&lt;A href="https://en.wikipedia.org/wiki/Java_class_file#cite_note-3"&gt;[3]&lt;/A&gt;&lt;/SUP&gt;
Java SE 8 = 52 (0x34 hex),
Java SE 7 = 51 (0x33 hex),
Java SE 6.0 = 50 (0x32 hex),
Java SE 5.0 = 49 (0x31 hex),
JDK 1.4 = 48 (0x30 hex),
JDK 1.3 = 47 (0x2F hex),
JDK 1.2 = 46 (0x2E hex),
JDK 1.1 = 45 (0x2D hex).&lt;/P&gt;&lt;P&gt;update your Java to JDK 1.8. This should resolve it. Also look at the following link.&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/22489398/unsupported-major-minor-version-52-0" target="_blank"&gt;http://stackoverflow.com/questions/22489398/unsupported-major-minor-version-52-0&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 12:50:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174556#M136819</guid>
      <dc:creator>mqureshi</dc:creator>
      <dc:date>2016-08-17T12:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174557#M136820</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2754/techguy9912.html" nodeid="2754"&gt;@Tech Guy&lt;/A&gt; compile your jar with Java 1.7 and run the job.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 15:14:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174557#M136820</guid>
      <dc:creator>sandyy006</dc:creator>
      <dc:date>2016-08-17T15:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Not Valid Jar Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174558#M136821</link>
      <description>&lt;P&gt;Thanks. It worked&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2016 00:45:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-Valid-Jar-Error/m-p/174558#M136821</guid>
      <dc:creator>TechGuy</dc:creator>
      <dc:date>2016-08-21T00:45:05Z</dc:date>
    </item>
  </channel>
</rss>

