Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here. Want to know more about what has changed? Check out the Community News blog.

Error while running beeline / hive2 action through oozie workflow

SOLVED Go to solution

Error while running beeline / hive2 action through oozie workflow

Contributor

We are trying to use beeline or hive2 for our jobs through oozie actions, but we are facing below error while deploying workflow: It would be helpful if someone can look into this issue.

 

Error:

Error: E0701 : E0701: XML schema error, cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'hive2'.

 

workflow.xml:

 

<workflow-app name="abc-historic-${version_number}" xmlns="uri:oozie:workflow:0.5">
<global>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
<property>
<name>oozie.launcher.mapred.child.java.opts</name>
<value>${childJavaOpts}</value>
</property>
</configuration>
</global>

<start to="hive-action-udm-opprtnty_assign-facts"/>

<action name="hive-action-udm-opprtnty_assign-facts">
<hive2 xmlns="uri:oozie:hive2-action:0.3">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<jdbc-url>jdbc:hive2://xyz.com:10000/default</jdbc-url>
<password>abc</password>
<script>${nameNode}/user/xyz/workflow_sla/sls_opprtnty_assign_fact.hql</script>
<param>database_destination=${hiveDatabaseDestination_udm}</param>
<param>database_source=${hiveDatabaseSource_raw}</param>
<param>hive_mapping_databasename=${hive_mapping_databasename}</param>
<param>hiveUDFJarPath=${ciUDFJarPath}</param>
<param>tenantid=${tenantId}</param>
<param>batchid=0</param>
<file>${hiveSiteDir}#hive-oozie-site.xml</file>
</hive2>
<ok to="hive-action-udm-opprtnty_assign-facts1"/>
<error to="killEmail"/>
</action>

<action name="hive-action-udm-opprtnty_assign-facts1">
<hive2 xmlns="uri:oozie:hive2-action:0.3">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<jdbc-url>jdbc:hive2://xyz.com:10000/default</jdbc-url>
<password>abc</password>
<script>${nameNode}/user/xyz/workflow_sla/sls_opprtnty_assign_fact.hql</script>
<param>database_destination=${hiveDatabaseDestination_udm}</param>
<param>database_source=${hiveDatabaseSource_raw}</param>
<param>hive_mapping_databasename=${hive_mapping_databasename}</param>
<param>hiveUDFJarPath=${ciUDFJarPath}</param>
<param>tenantid=${tenantId}</param>
<param>batchid=0</param>
<file>${hiveSiteDir}#hive-oozie-site.xml</file>
</hive2>
<ok to="hive-action-udm-opprtnty_assign-facts2"/>
<error to="killEmail"/>
</action>

<action name="hive-action-udm-opprtnty_assign-facts2">
<hive2 xmlns="uri:oozie:hive-action:0.3">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<jdbc-url>jdbc:hive2://xyz.com:10000/default</jdbc-url>
<password>abc</password>
<script>${nameNode}/user/xyz/workflow_sla/sls_opprtnty_assign_fact.hql</script>
<param>database_destination=${hiveDatabaseDestination_udm}</param>
<param>database_source=${hiveDatabaseSource_raw}</param>
<param>hive_mapping_databasename=${hive_mapping_databasename}</param>
<param>hiveUDFJarPath=${ciUDFJarPath}</param>
<param>tenantid=${tenantId}</param>
<param>batchid=0</param>
<file>${hiveSiteDir}#hive-oozie-site.xml</file>
</hive2>
<ok to="hive-action-udm-opprtnty_assign-facts3"/>
<error to="killEmail"/>
</action>


<action name="hive-action-udm-opprtnty_assign-facts3">
<hive2 xmlns="uri:oozie:hive2-action:0.3">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<jdbc-url>jdbc:hive2://xyz.com:10000/default</jdbc-url>
<password>abc</password>
<script>${nameNode}/user/xyz/workflow_sla/sls_opprtnty_assign_fact.hql</script>
<param>database_destination=${hiveDatabaseDestination_udm}</param>
<param>database_source=${hiveDatabaseSource_raw}</param>
<param>hive_mapping_databasename=${hive_mapping_databasename}</param>
<param>hiveUDFJarPath=${ciUDFJarPath}</param>
<param>tenantid=${tenantId}</param>
<param>batchid=0</param>
<file>${hiveSiteDir}#hive-oozie-site.xml</file>
</hive2>
<ok to="udm-transform-end"/>
<error to="killEmail"/>
</action>


<action name="killEmail">
<email xmlns="uri:oozie:email-action:0.1">
<to>${emailRecipients}</to>
<subject>Oozie Workflow Run Error On UDM-historic Workflow</subject>
<body>Oozie workflow id: ${wf:id()}, run failed.Error Message: [ ${wf:errorMessage(wf:lastErrorNode())} ]
</body>
</email>
<ok to="kill"/>
<error to="kill"/>
</action>

<kill name="kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>

<end name="udm-transform-end"/>

<!-- <sla:info>
<sla:nominal-time></sla:nominal-time>
<sla:should-end>${17 * MINUTES}</sla:should-end>
<sla:max-duration>${17 * MINUTES}</sla:max-duration>
<sla:alert-events>duration_miss</sla:alert-events>
<sla:alert-contact>xyx@gmail.com</sla:alert-contact>
</sla:info> -->

</workflow-app>

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Error while running beeline / hive2 action through oozie workflow

Master Guru

Its actually because you're using an incorrect schema name and version in the xmlns field for the hive2 action type.

 

Change the below:

 

<hive2 xmlns="uri:oozie:hive-action:0.3">

To this valid value instead:

 

<hive2 xmlns="uri:oozie:hive2-action:0.2">

The hive2 action is documented at http://archive.cloudera.com/cdh5/cdh/5/oozie/DG_Hive2ActionExtension.html

4 REPLIES 4

Re: Error while running beeline / hive2 action through oozie workflow

Contributor

We are using CDH 5.8, looks like oozie is 4.1, is it because of older version of oozie ?

Re: Error while running beeline / hive2 action through oozie workflow

Master Guru

Its actually because you're using an incorrect schema name and version in the xmlns field for the hive2 action type.

 

Change the below:

 

<hive2 xmlns="uri:oozie:hive-action:0.3">

To this valid value instead:

 

<hive2 xmlns="uri:oozie:hive2-action:0.2">

The hive2 action is documented at http://archive.cloudera.com/cdh5/cdh/5/oozie/DG_Hive2ActionExtension.html

Re: Error while running beeline / hive2 action through oozie workflow

Contributor

I am still getting same error with following too:

 

<hive2 xmlns="uri:oozie:hive2-action:0.2">

Error: E0701 : E0701: XML schema error, cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'hive2'.

 

Re: Error while running beeline / hive2 action through oozie workflow

Contributor

Ok, it worked now thanks!!!