<?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 Re: Cannot load main class from JAR file in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170779#M41887</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I tried like you said.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;still I am getting below error :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;java.lang.ClassNotFoundException: SparkPhoenixHbase&lt;/P&gt;&lt;P&gt;at java.net.URLClassLoader$1.run(URLClassLoader.java:366)&lt;/P&gt;&lt;P&gt;at java.net.URLClassLoader$1.run(URLClassLoader.java:355)&lt;/P&gt;&lt;P&gt;at java.security.AccessController.doPrivileged(Native Method)&lt;/P&gt;&lt;P&gt;at java.net.URLClassLoader.findClass(URLClassLoader.java:354)&lt;/P&gt;&lt;P&gt;at java.lang.ClassLoader.loadClass(ClassLoader.java:425)&lt;/P&gt;&lt;P&gt;at java.lang.ClassLoader.loadClass(ClassLoader.java:358)&lt;/P&gt;&lt;P&gt;at java.lang.Class.forName0(Native Method)&lt;/P&gt;&lt;P&gt;at java.lang.Class.forName(Class.java:270)&lt;/P&gt;&lt;P&gt;at org.apache.spark.util.Utils$.classForName(Utils.scala:173)&lt;/P&gt;&lt;P&gt;at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:652)&lt;/P&gt;&lt;P&gt;at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)&lt;/P&gt;&lt;P&gt;at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)&lt;/P&gt;&lt;P&gt;at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)&lt;/P&gt;&lt;P&gt;at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2016 14:44:23 GMT</pubDate>
    <dc:creator>anjultiwari</dc:creator>
    <dc:date>2016-09-27T14:44:23Z</dc:date>
    <item>
      <title>Cannot load main class from JAR file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170777#M41885</link>
      <description>&lt;P&gt;I am trying the launch spark job using spark-submit. But I am getting the error as "Cannot load main class from JAR file"&lt;/P&gt;&lt;P&gt;spark-submit  \ &lt;/P&gt;&lt;P&gt;--verbose --master local[4] \ &lt;/P&gt;&lt;P&gt;--class com.training.bigdata.SparkPhoenixHbase sparkPhoenixHbase-1.0-SNAPSHOT-job.jar&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:23:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170777#M41885</guid>
      <dc:creator>anjultiwari</dc:creator>
      <dc:date>2016-09-27T14:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load main class from JAR file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170778#M41886</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/13228/anjultiwari.html" nodeid="13228"&gt;@anjul tiwari&lt;/A&gt;&lt;P&gt;Seems to be related to Jira &lt;A href="https://issues.apache.org/jira/browse/SPARK-4298"&gt;SPARK-4298&lt;/A&gt;. Please try sqoop command as below:&lt;/P&gt;&lt;P&gt;spark-submit \&lt;/P&gt;&lt;P&gt;--verbose --master local[4] \&lt;/P&gt;&lt;P&gt;--class SparkPhoenixHbase com/training/bigdata/sparkPhoenixHbase-1.0-SNAPSHOT-job.jar&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:31:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170778#M41886</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-09-27T14:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load main class from JAR file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170779#M41887</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I tried like you said.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;still I am getting below error :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;java.lang.ClassNotFoundException: SparkPhoenixHbase&lt;/P&gt;&lt;P&gt;at java.net.URLClassLoader$1.run(URLClassLoader.java:366)&lt;/P&gt;&lt;P&gt;at java.net.URLClassLoader$1.run(URLClassLoader.java:355)&lt;/P&gt;&lt;P&gt;at java.security.AccessController.doPrivileged(Native Method)&lt;/P&gt;&lt;P&gt;at java.net.URLClassLoader.findClass(URLClassLoader.java:354)&lt;/P&gt;&lt;P&gt;at java.lang.ClassLoader.loadClass(ClassLoader.java:425)&lt;/P&gt;&lt;P&gt;at java.lang.ClassLoader.loadClass(ClassLoader.java:358)&lt;/P&gt;&lt;P&gt;at java.lang.Class.forName0(Native Method)&lt;/P&gt;&lt;P&gt;at java.lang.Class.forName(Class.java:270)&lt;/P&gt;&lt;P&gt;at org.apache.spark.util.Utils$.classForName(Utils.scala:173)&lt;/P&gt;&lt;P&gt;at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:652)&lt;/P&gt;&lt;P&gt;at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)&lt;/P&gt;&lt;P&gt;at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)&lt;/P&gt;&lt;P&gt;at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)&lt;/P&gt;&lt;P&gt;at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:44:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170779#M41887</guid>
      <dc:creator>anjultiwari</dc:creator>
      <dc:date>2016-09-27T14:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load main class from JAR file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170780#M41888</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/13228/anjultiwari.html" nodeid="13228"&gt;@anjul tiwari&lt;/A&gt;&lt;P&gt;Please share the output of command jar tvf sparkPhoenixHbase-1.0-SNAPSHOT-job.jar.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:54:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170780#M41888</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-09-27T14:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load main class from JAR file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170781#M41889</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt;&lt;P&gt;Here is the output of &lt;STRONG&gt;jar tvf sparkPhoenixHbase-1.0-SNAPSHOT-job.jar.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/8022-output.txt"&gt;output.txt&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 15:01:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170781#M41889</guid>
      <dc:creator>anjultiwari</dc:creator>
      <dc:date>2016-09-27T15:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load main class from JAR file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170782#M41890</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt; , I think I got the solution now. I was missing "&lt;STRONG&gt;package&lt;/STRONG&gt;" keyword while creating jar using maven.&lt;/P&gt;&lt;P&gt;I was using below command earlier :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- - &amp;gt;  mvn clean compile assembly:single &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now I have changed the command to :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- - &amp;gt; mvn clean package assembly:single&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;After building the jar using above command, spark job is running fine.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt; for your help. I got the solution because of your help.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 15:18:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170782#M41890</guid>
      <dc:creator>anjultiwari</dc:creator>
      <dc:date>2016-09-27T15:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load main class from JAR file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170783#M41891</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13228/anjultiwari.html" nodeid="13228"&gt;@anjul tiwari&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thank you for the update. Please mark helpful answer to close the discussion.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 14:09:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170783#M41891</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-09-29T14:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load main class from JAR file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170784#M41892</link>
      <description>&lt;P&gt;I too was facing the same issue&lt;/P&gt;&lt;P&gt;since i was copying the command from a window editor so you might need to edit the command yourself and change the eol in notepad++(EDIT &amp;gt; EOL Conversion &amp;gt; UNIX) and the problem might get solved.&lt;/P&gt;,&lt;P&gt;I too faced the problem. i was copying the command from window editor ( word) to notepad++ and was running in EMR linux machine it was showing the same error as mentioned. The problem was resolved only when i typed the command my self on notepad++ and changed the EOL of the file and it ran successfully without the error. Please try this in case you face the same issue.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 19:15:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-load-main-class-from-JAR-file/m-p/170784#M41892</guid>
      <dc:creator>rahulsinghaakas</dc:creator>
      <dc:date>2018-08-23T19:15:01Z</dc:date>
    </item>
  </channel>
</rss>

