Created on 07-27-2016 03:05 PM - edited 09-16-2022 03:31 AM
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>
Created 07-27-2016 06:32 PM
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
Created 07-27-2016 04:06 PM
We are using CDH 5.8, looks like oozie is 4.1, is it because of older version of oozie ?
Created 07-27-2016 06:32 PM
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
Created 07-28-2016 09:29 AM
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'.
Created 07-28-2016 09:59 AM
Ok, it worked now thanks!!!