title: hive action failing in oozie (on cloudera CDH 4.1.1)
body: <p>When I run a hive script with from oozie od CDH 4.1.1 </p>
  
  <p>The run fails with:</p>
  
  <pre><code>Error Code  JA018
  Error Message   org/apache/hadoop/hive/cli/CliDriver
  
  Details
  Property    Value
  External Id job_201211281608_0112
  External Status FAILED/KILLED
  Data    None
  Start time   Sat, 01 Dec 2012 03:02:37
  End time     Sat, 01 Dec 2012 03:03:07
  Id  0000007-121128160850795-oozie-oozi-W@ExchangeRateTest
  Retries 0
  TrackerUri  overlord-datanode1:8021
  Transition  kill
  </code></pre>
  
  <p><a href="http://archive.cloudera.com/cdh4/cdh/4/oozie/oozie-default.xml" rel="noreferrer">Googling JA018</a> reveals only one cryptic hint:  JA018 is output directory exists error in workflow map-reduce action. </p>
  
  <p>I copied my hiv-site.xml to HDFS and set in the workflow.xml:
  oozie.hive.defaults /user/hue/oozie/workspaces/<em>overlord</em>-oozie-1/hive-site.xml</p>
  
  <p>Here is the complete workflow.xml:</p>
  
  <pre><code>&lt;workflow-app name="HiveTest" xmlns="uri:oozie:workflow:0.4"&gt;
      &lt;start to="ExchangeRateTest"/&gt;
      &lt;action name="ExchangeRateTest"&gt;
          &lt;hive xmlns="uri:oozie:hive-action:0.2"&gt;
              &lt;job-tracker&gt;${jobTracker}&lt;/job-tracker&gt;
              &lt;name-node&gt;${nameNode}&lt;/name-node&gt;
              &lt;prepare&gt;
                  &lt;delete path="${nameNode}${jobOutput}"/&gt;
              &lt;/prepare&gt;
              &lt;configuration&gt;
                  &lt;property&gt;
                      &lt;name&gt;oozie.use.system.libpath&lt;/name&gt;
                      &lt;value&gt;true&lt;/value&gt;
                  &lt;/property&gt;
                  &lt;property&gt;
                      &lt;name&gt;oozie.hive.defaults&lt;/name&gt;
                      &lt;value&gt;/user/hue/oozie/workspaces/_overlord_-oozie-1/hive-site.xml&lt;/value&gt;
                  &lt;/property&gt;
              &lt;/configuration&gt;
              &lt;script&gt;/user/hue/oozie/workspaces/_overlord_-oozie-1/03_update_exchange_rates_final.hive&lt;/script&gt;
                &lt;param&gt;OUTPUT=${jobOutput}&lt;/param&gt;
          &lt;/hive&gt;
          &lt;ok to="end"/&gt;
          &lt;error to="kill"/&gt;
      &lt;/action&gt;
      &lt;kill name="kill"&gt;
          &lt;message&gt;Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&lt;/message&gt;
      &lt;/kill&gt;
      &lt;end name="end"/&gt;
  &lt;/workflow-app&gt;
  </code></pre>
  
  <p>How can get this to work?</p>