<?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: Oozie work flow not finding main class in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341442#M233524</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/12885"&gt;@mszurap&lt;/a&gt;&amp;nbsp;You were right I didn't have the "s" at the end&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;. However I am still getting the problem on oozie, I've add a screen shot so you can see the structure of my program and you can see in the MANIFEST.MF file it has my Main class as&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Hortonworks.SparkTutorial.Main&lt;/PRE&gt;&lt;BR /&gt;&lt;IMG src="http://community.cloudera.com/t5/image/serverpage/image-id/39827iA721F7532906B358/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Capture9.PNG" title="Capture9.PNG" /&gt;</description>
    <pubDate>Thu, 14 Apr 2022 15:18:13 GMT</pubDate>
    <dc:creator>jarededrake</dc:creator>
    <dc:date>2022-04-14T15:18:13Z</dc:date>
    <item>
      <title>Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341254#M233469</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am going through this tutorial&amp;nbsp;&lt;A href="https://www.cloudera.com/tutorials/setting-up-a-spark-development-environment-with-java.html" target="_blank" rel="noopener"&gt;https://www.cloudera.com/tutorials/setting-up-a-spark-development-environment-with-java.html&lt;/A&gt;&amp;nbsp;and I am trying to submit it through Oozie work flow. In Hue I am going to Query &amp;gt; Scheduler &amp;gt; Workflow then dropping Java program to actions and then uploading jar file then adding the main class which is Hortonworks.SparkTutorial.Main. When I click to run the Oozie work flow job I keep getting the error of: "Caused by: java.lang.ClassNotFoundException: Class Hortonwork.SparkTutorial.Main not found". I'm using intelliJ to do this project so I hold down ctrl and hover over Main and it takes me to MANIFEST.MF file and it says Main-Class: Hortonworks.SparkTutorial.Main so I'm getting the main class definition right I feel like. I cannot figure out why it is saying it can't find my class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 15:49:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341254#M233469</guid>
      <dc:creator>jarededrake</dc:creator>
      <dc:date>2022-04-12T15:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341315#M233489</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95882"&gt;@jarededrake&lt;/a&gt;&amp;nbsp;, The "&lt;SPAN&gt;ClassNotFoundException: Class Hortonwork.SparkTutorial.Main not found" suggests that in the Java program's main class package name might have a typo (in your workflow definiton), the&amp;nbsp;Hortonwork should be&amp;nbsp;Hortonworks. Can you check that?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 09:03:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341315#M233489</guid>
      <dc:creator>mszurap</dc:creator>
      <dc:date>2022-04-13T09:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341442#M233524</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/12885"&gt;@mszurap&lt;/a&gt;&amp;nbsp;You were right I didn't have the "s" at the end&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;. However I am still getting the problem on oozie, I've add a screen shot so you can see the structure of my program and you can see in the MANIFEST.MF file it has my Main class as&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Hortonworks.SparkTutorial.Main&lt;/PRE&gt;&lt;BR /&gt;&lt;IMG src="http://community.cloudera.com/t5/image/serverpage/image-id/39827iA721F7532906B358/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Capture9.PNG" title="Capture9.PNG" /&gt;</description>
      <pubDate>Thu, 14 Apr 2022 15:18:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341442#M233524</guid>
      <dc:creator>jarededrake</dc:creator>
      <dc:date>2022-04-14T15:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341457#M233529</link>
      <description>&lt;P&gt;I see. Have you verified that the built jar contains this package structure and class names? Can you also show where the jar is uploaded and how is it referenced in the oozie workflow?&lt;/P&gt;&lt;P&gt;Thanks, Miklos&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 16:12:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341457#M233529</guid>
      <dc:creator>mszurap</dc:creator>
      <dc:date>2022-04-14T16:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341511#M233546</link>
      <description>&lt;P&gt;I can yes I will get those screen shots to you&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 15:11:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341511#M233546</guid>
      <dc:creator>jarededrake</dc:creator>
      <dc:date>2022-04-15T15:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341512#M233547</link>
      <description>&lt;P&gt;So this is interesting, I run "mvn package" to package my application into a jar and I get two different jars I get a SparkTutorial.jar. When I look at the contents of that jar file I only see my dependencies but I do not see my main class&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run:&amp;nbsp;jar tf C:\Users\drakej\Desktop\SparkTutorial\out\artifacts\SparkTutorial_jar\SparkTutorial.jar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample of the output is below, it only lists my dependencies.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;org/apache/hadoop/ha/proto/HAServiceProtocolProtos$TransitionToStandbyRequestProto$Builder.class&lt;BR /&gt;org/apache/hadoop/ha/proto/HAServiceProtocolProtos$TransitionToStandbyRequestProto.class&lt;BR /&gt;org/apache/hadoop/ha/proto/HAServiceProtocolProtos$TransitionToStandbyRequestProtoOrBuilder.class&lt;BR /&gt;org/apache/hadoop/ha/proto/HAServiceProtocolProtos$TransitionToStandbyResponseProto$1.class&lt;BR /&gt;org/apache/hadoop/ha/proto/HAServiceProtocolProtos$TransitionToStandbyResponseProto$Builder.class&lt;BR /&gt;org/apache/hadoop/ha/proto/HAServiceProtocolProtos$TransitionToStandbyResponseProto.class&lt;BR /&gt;org/apache/hadoop/ha/proto/HAServiceProtocolProtos$TransitionToStandbyResponseProtoOrBuilder.class&lt;BR /&gt;org/apache/hadoop/ha/proto/HAServiceProtocolProtos.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$1.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$CedeActiveRequestProto$1.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$CedeActiveRequestProto$Builder.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$CedeActiveRequestProto.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$CedeActiveRequestProtoOrBuilder.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$CedeActiveResponseProto$1.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$CedeActiveResponseProto$Builder.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$CedeActiveResponseProto.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$CedeActiveResponseProtoOrBuilder.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$GracefulFailoverRequestProto$1.class&lt;BR /&gt;org/apache/hadoop/ha/proto/ZKFCProtocolProtos$GracefulFailoverRequestProto$Builder.class&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second jar file that is made is&amp;nbsp;SparkTutorial-1.0-SNAPSHOT.jar, I run&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;jar tf C:\Users\drakej\Desktop\SparkTutorial\target\SparkTutorial-1.0-SNAPSHOT.jar&lt;/P&gt;&lt;P&gt;Then there it has my class listed, however when I run this jar file in oozie I get the error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;org.apache.oozie.action.hadoop.JavaMainException: java.lang.NoClassDefFoundError: org/apache/spark/SparkConf&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;So one jar has my dependencies and another jar has my class but they are not together.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 15:29:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341512#M233547</guid>
      <dc:creator>jarededrake</dc:creator>
      <dc:date>2022-04-15T15:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341513#M233548</link>
      <description>&lt;P&gt;Forgot to add the contents of&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;jar tf C:\Users\drakej\Desktop\SparkTutorial\target\SparkTutorial-1.0-SNAPSHOT.jar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;META-INF/&lt;BR /&gt;META-INF/MANIFEST.MF&lt;BR /&gt;Hortonworks/&lt;BR /&gt;Hortonworks/SparkTutorial/&lt;BR /&gt;code.txt&lt;BR /&gt;Hortonworks/SparkTutorial/Main.class&lt;BR /&gt;Main.class&lt;BR /&gt;replacementValues.properties&lt;BR /&gt;shakespeareText.txt&lt;BR /&gt;ULAN-Test-IPSummary.csv&lt;BR /&gt;ULAN-Test-IPSummary.txt&lt;BR /&gt;META-INF/maven/&lt;BR /&gt;META-INF/maven/hortonworks/&lt;BR /&gt;META-INF/maven/hortonworks/SparkTutorial/&lt;BR /&gt;META-INF/maven/hortonworks/SparkTutorial/pom.xml&lt;BR /&gt;META-INF/maven/hortonworks/SparkTutorial/pom.properties&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 15:31:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/341513#M233548</guid>
      <dc:creator>jarededrake</dc:creator>
      <dc:date>2022-04-15T15:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/342350#M233719</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95882"&gt;@jarededrake&lt;/a&gt;&amp;nbsp;, sorry for the delay, I was away for a couple of days.&lt;/P&gt;&lt;P&gt;You should use your thin jar (application only - without the dependencies) in the target directory ("&lt;SPAN&gt;SparkTutorial-1.0-SNAPSHOT.jar"). The&amp;nbsp;NoClassDefFoundError for the&amp;nbsp;SparkConf suggests that you've tried a Java action. It is highly suggested to use a Spark action in Oozie workflow editor when running a Spark application to make sure that the environment is set up properly for the application.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 12:09:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/342350#M233719</guid>
      <dc:creator>mszurap</dc:creator>
      <dc:date>2022-04-26T12:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/342386#M233724</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/12885"&gt;@mszurap&lt;/a&gt; , no problem at all totally understand.&amp;nbsp; So I ran my "&lt;SPAN&gt;SparkTutorial-1.0-SNAPSHOT.jar" from Hue &amp;gt; Query &amp;gt; Scheduler &amp;gt; Workflow, I then drag down Spark to the work flow, I then fill out the inputs like this:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Jar/py name: SParkTutorial-10.0.SNAPSHOT.jar&lt;/P&gt;&lt;P&gt;Main class: Main&amp;nbsp;&lt;/P&gt;&lt;P&gt;Files + :&amp;nbsp;/user/zzmdrakej2/SparkTutorial-1.0-SNAPSHOT.jar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then get this error, its different so I guess that's a good sign right:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SparkMain], main() threw exception, Delegation Token can be issued only with kerberos or web authentication&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 16:14:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/342386#M233724</guid>
      <dc:creator>jarededrake</dc:creator>
      <dc:date>2022-04-26T16:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/342431#M233733</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95882"&gt;@jarededrake&lt;/a&gt;&amp;nbsp;, that's a good track, the issue currently seems to be that the cluster has Kerberos enabled, and that needs an extra configuration.&lt;/P&gt;&lt;P&gt;In the workflow editor, in the right upper corner of the Spark action you will find a cogwheel icon for advanced settings. There on the Credentials tab enable the "hcat" and "hbase" credentials to let the Spark client obtain delegation tokens for the Hive (Hive metastore) and HBase services - in case the spark application wants to use those services (Spark does not know this in advance, so it obtains those DTs). You can disable this behavior too if you are sure that the Spark applicatino will not connect to Hive (using Spark SQL) or HBase, just add the following to the Spark action option list:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;--conf spark.security.credentials.hadoopfs.enabled=false --conf spark.security.credentials.hbase.enabled=false --conf spark.security.credentials.hive.enabled=false&lt;/LI-CODE&gt;&lt;P&gt;but it's easier to just enable these credentials in the settings page.&lt;/P&gt;&lt;P&gt;For similar Kerberos related issues in other actions, please see the following guide:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gethue.com/hadoop-tutorial-oozie-workflow-credentials-with-a-hive-action-with-kerberos/" target="_blank"&gt;https://gethue.com/hadoop-tutorial-oozie-workflow-credentials-with-a-hive-action-with-kerberos/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 07:54:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/342431#M233733</guid>
      <dc:creator>mszurap</dc:creator>
      <dc:date>2022-04-27T07:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie work flow not finding main class</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/343025#M233860</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95882"&gt;@jarededrake&lt;/a&gt;&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 20:23:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-work-flow-not-finding-main-class/m-p/343025#M233860</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2022-05-03T20:23:34Z</dc:date>
    </item>
  </channel>
</rss>

