<?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: Cloudera 5.4..x Oozie custom actions not finding LauncherMain derived classes in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cloudera-5-4-x-Oozie-custom-actions-not-finding-LauncherMain/m-p/28220#M6164</link>
    <description>&lt;P&gt;Thanks for the reminder/hint, it got me past that issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bill M.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jun 2015 21:26:25 GMT</pubDate>
    <dc:creator>BillM.</dc:creator>
    <dc:date>2015-06-04T21:26:25Z</dc:date>
    <item>
      <title>Cloudera 5.4..x Oozie custom actions not finding LauncherMain derived classes</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cloudera-5-4-x-Oozie-custom-actions-not-finding-LauncherMain/m-p/28130#M6162</link>
      <description>&lt;P&gt;I am testing in the Clouera Quickstart 5.4.x VM where I have a custom action which should launch a class dervied from LauncherMain, in the very same jar as the custom action nd in the same package that generates lass loading errors at run time in the logs.&amp;nbsp; How can I get my LauncherMain dervied class to resolve at runtime in Cloudear 5.4.x&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;2015-06-01 19:17:34,830 WARN org.apache.oozie.action.hadoop.MyShellActionExecutor: SERVER[quickstart.cloudera] USER[cloudera] GROUP[-] TOKEN[] APP[myshelltest-wf] JOB[0000001-150601185236348-oozie-oozi-W] ACTION[0000001-150601185236348-oozie-oozi-W@script-job] Launcher exception: java.lang.ClassNotFoundException: Class org.apache.oozie.action.hadoop.MyShellMain not found
java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.oozie.action.hadoop.MyShellMain not found
	at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2112)
	at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:226)
	at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
	at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
	at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runSubtask(LocalContainerLauncher.java:370)
	at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runTask(LocalContainerLauncher.java:295)
	at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.access$200(LocalContainerLauncher.java:181)
	at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler$1.run(LocalContainerLauncher.java:224)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: Class org.apache.oozie.action.hadoop.MyShellMain not found
	at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2018)
	at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2110)
	... 13 more&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Consider the following example, the code for the custom action reads:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;package org.apache.oozie.action.hadoop; // So that we can leverage the JavaActionExecutor&lt;BR /&gt;&lt;BR /&gt;public class MyShellActionExecutor extends JavaActionExecutor {&lt;/P&gt;&lt;P&gt;// most code omitted for brevity /L&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt;protected String getLauncherMain(Configuration launcherConf, Element actionXml) {&lt;BR /&gt;return launcherConf.get(LauncherMapper.CONF_OOZIE_ACTION_MAIN_CLASS, MyShellMain.class.getName());&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and MyShellMain includes the following (a lot of code is omitted for brevity):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;package org.apache.oozie.action.hadoop;&lt;/P&gt;&lt;P&gt;import org.apache.hadoop.conf.Configuration;&lt;BR /&gt;import org.apache.hadoop.fs.Path;&lt;BR /&gt;import org.apache.hadoop.util.Shell;&lt;/P&gt;&lt;P&gt;import java.io.*;&lt;BR /&gt;import java.util.ArrayList;&lt;BR /&gt;import java.util.HashSet;&lt;BR /&gt;import java.util.List;&lt;BR /&gt;import java.util.Map;&lt;/P&gt;&lt;P&gt;/**&lt;BR /&gt;* Created by BillM on 6/1/15.&lt;BR /&gt;*/&lt;BR /&gt;public class MyShellMain extends LauncherMain {&lt;/P&gt;&lt;P&gt;/**&lt;BR /&gt;* @param args Invoked from LauncherMapper:map()&lt;BR /&gt;* @throws Exception&lt;BR /&gt;*/&lt;BR /&gt;public static void main(String[] args) throws Exception {&lt;BR /&gt;run(ShellMain.class, args);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// stuff omitted&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:30:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cloudera-5-4-x-Oozie-custom-actions-not-finding-LauncherMain/m-p/28130#M6162</guid>
      <dc:creator>BillM.</dc:creator>
      <dc:date>2022-09-16T09:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cloudera 5.4..x Oozie custom actions not finding LauncherMain derived classes</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cloudera-5-4-x-Oozie-custom-actions-not-finding-LauncherMain/m-p/28210#M6163</link>
      <description>- the custom action jar would need to be on the Oozie server hence it needs to go into /var/lib/oozie directory. 
- main class needs be in the sharelib


&lt;A href="http://blog.cloudera.com/blog/2012/12/how-to-use-the-sharelib-in-apache-oozie/" target="_blank"&gt;http://blog.cloudera.com/blog/2012/12/how-to-use-the-sharelib-in-apache-oozie/&lt;/A&gt; 
&lt;A href="http://blog.cloudera.com/blog/2014/05/how-to-use-the-sharelib-in-apache-oozie-cdh-5/" target="_blank"&gt;http://blog.cloudera.com/blog/2014/05/how-to-use-the-sharelib-in-apache-oozie-cdh-5/&lt;/A&gt;</description>
      <pubDate>Thu, 04 Jun 2015 16:57:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cloudera-5-4-x-Oozie-custom-actions-not-finding-LauncherMain/m-p/28210#M6163</guid>
      <dc:creator>Dat Pham</dc:creator>
      <dc:date>2015-06-04T16:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cloudera 5.4..x Oozie custom actions not finding LauncherMain derived classes</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cloudera-5-4-x-Oozie-custom-actions-not-finding-LauncherMain/m-p/28220#M6164</link>
      <description>&lt;P&gt;Thanks for the reminder/hint, it got me past that issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bill M.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2015 21:26:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cloudera-5-4-x-Oozie-custom-actions-not-finding-LauncherMain/m-p/28220#M6164</guid>
      <dc:creator>BillM.</dc:creator>
      <dc:date>2015-06-04T21:26:25Z</dc:date>
    </item>
  </channel>
</rss>

