Question

The following is my workflow.xml

<workflow-app xmlns="uri:oozie:workflow:0.3" name="import-job">
<start to="createtimelinetable" />
 <action name="createtimelinetable">
   <sqoop xmlns="uri:oozie:sqoop-action:0.3">
              <job-tracker>${jobTracker}</job-tracker>
              <name-node>${nameNode}</name-node>
              <configuration>
                  <property>
                      <name>mapred.compress.map.output</name>
                      <value>true</value>
                  </property>
              </configuration>
              <command>import --connect jdbc:mysql://10.65.220.75:3306/automation --table ABC --username root</command>
   </sqoop>
   <ok to="end"/>
   <error to="end"/>
 </action>
 <end name="end"/>
</workflow-app>

Getting the following error on trying to submit the job:

Error: E0701 : E0701: XML schema error, cvc-elt.1.a: Cannot find the declaration of element 'action'.

However, oozie validate workflow.xml returns: Valid worflow-app

Anyone who faced and resolved a similar issue in the past?

Was it helpful?

Solution

Confirm if you have copied your workflow.xml to hdfs. You need not copy job.properties to hdfs but have to copy all the other files and libraries to hdfs

OTHER TIPS

For those who reached here by googling the error message below is the general way to resolve Oozie schema issues:

Once your workflow.xml is complete, it's a best practice to validate it against oozie XSD schema file rather than submitting the Ooozie job and facing the issue later.

note on What is XSD schema: XSD schema is a kind of validation file which narrates,

a. Sequence of tags

b. whether a tag should be present or not

c. what are the valid sub-tags in a tag, etc.

How to validate workflow XML against XSD?

a. find out the specific XSD, this is seen in xmlns(xml namespace) property

< workflow-app name='FooBarWorkFlow' xmlns="uri:oozie:workflow:0.4">

in this case, it is uri:oozie:workflow:0.4. find the XSD file of uri:oozie:workflow:0.4(get it from appendix of Oozie official site or can be found easily by Googling)

b. There are numerous XML validation sites(example https://www.liquid-technologies.com/online-xsd-validator), provide your Workflow XML file ,XSD file and validate

Errors in workflow XML file will be listed out with line and column info. Rectify these, now use the valid Workflow XML file to avoid schema validation errors in oozie.

oozie validate some_workflow.xml

Tells you line numbers and is much easier to understand than logging output.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top