- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Oozie-Java Action-ClassNotFoundException
Created on 01-09-2014 01:54 PM - edited 09-16-2022 01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using CDH 4.4 and trying to run "HelloWorld" java action in oozie (Web UI).
I get "java.lang.ClassNotFoundException: Class HelloWorld not found".
I have uploaded the jar in the workflow`s workspace. Is there a place where i have to set the classpath?
Or is there anything else that i am missing?
Configuration:
Name Value
hue-id-w | 22 |
jobTracker | localhost.localdomain:8021 |
nameNode | hdfs://localhost.localdomain:8020 |
oozie.use.system.libpath | true |
oozie.wf.application.path | hdfs://localhost.localdomain:8020/user/hue/oozie/workspaces/_cloudera_-oozie-22-1389296910.99 |
user.name | cloudera |
Definition:
"<workflow-app name="WF22" xmlns="uri:oozie:workflow:0.4">
<start to="GBB12"/>
<action name="GBB12">
<java>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<main-class>HelloWorld</main-class>
<arg>er</arg>
</java>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>"
Created 01-09-2014 04:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ha true.
Could you list the content of
hdfs://localhost.localdomain:8020/user/hue/oozie/workspaces/_cloudera_-oozie-22-1389296910.99
Specyfing the path in the 'Jar name' should have the file copied into a sub dir nameed lib?
hdfs://localhost.localdomain:8020/user/hue/oozie/workspaces/_cloudera_-oozie-22-1389296910.99/lib
If not it can be done manually:
If it does not work, could you share the logs of the action? Also make sure the class is in the jar.
Created 01-09-2014 02:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to add the jar in the HDFS workspace ('Workspace' in the menu of the Editor) of the Workflow and specify its name in the 'Jar name' field of the Java action.
Of just create a 'lib' dir in the workspace of the workflow and upload the jar there.
Created 01-09-2014 02:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have uploaded the jar in the workspace which is
hdfs://localhost.localdomain:8020/user/hue/oozie/workspaces/_cloudera_-oozie-22-1389296910.99
I uploaded it while creating the java action using the UI in the name "Jar name" . Despite that i get the exception
Created 01-09-2014 03:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you share the XML of the workflow?
Created 01-09-2014 04:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didnot upload any extra xml.
The xml file generated by oozie as "workflow.xml" is posted in the question under the heading "Definition"
Created 01-09-2014 04:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ha true.
Could you list the content of
hdfs://localhost.localdomain:8020/user/hue/oozie/workspaces/_cloudera_-oozie-22-1389296910.99
Specyfing the path in the 'Jar name' should have the file copied into a sub dir nameed lib?
hdfs://localhost.localdomain:8020/user/hue/oozie/workspaces/_cloudera_-oozie-22-1389296910.99/lib
If not it can be done manually:
If it does not work, could you share the logs of the action? Also make sure the class is in the jar.
Created 01-09-2014 04:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Creating a "lib" folder manually in hdfs://localhost.localdomain:8020/user/hue/oozie/workspaces/_cloudera_-oozie-22-1389296910.99
and placing the jar inside the "lib" folder helped!
Now my java action runs successfully.
Can you please share the documentation of using the Web UI if there is one?
Thanks!
Created 01-09-2014 05:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Awesome!
You can click on the Help icon in the naviation bar.
Also see thr blog with video and tutorials:
Or look at the documentation of a release:
http://cloudera.github.io/hue/docs-3.5.0/index.html
http://gethue.tumblr.com/tagged/release
