Support Questions

Find answers, ask questions, and share your expertise

Error: E0701 : E0701: XML schema error, cvc-complex-type.2.4.a: Invalid content was found starting with element 'job-xml'. One of '{"uri:oozie:sqoop- action:0.2":command, "uri:oozie:sqoop-action:0.2":arg}' is expected.

avatar
Rising Star

In apache oozie book i found this and please help me how to XML version 0.4 my XML version is 0.2

Common Errors and Debugging

In this section, we cover some common errors and give various tips and solutions.

We hope this section will save you some time by being a quick reference guide for

some of the common mistakes we have seen repeated on Oozie.

A lot of the Oozie-level errors that the server throws are usually

E0710 or E0701. You will see these errors in the Oozie UI and these

errors usually mean it’s not a Hadoop issue, but something in the

Oozie system.

Workflow XML schema errors:

Always be aware of the XML schema version and

features. When you see errors like the one shown here, check the schema:

Error: E0701 : E0701: XML schema error, cvc-complex-type.2.4.a:

Invalid content was found starting with element 'global'. One of

'{"uri:oozie:workflow:0.3":credentials, "uri:oozie:workflow:0.3":start}'

is expected.

Issues with the <global> section:

The example error previously shown relates to support

for the <global> section. It’s only supported in workflow XML version 0.4 or

higher, as shown here:

<workflow-app xmlns="uri:oozie:workflow:0.4" name="my-test-wf">

Also, with some of the extension actions like hive or shell, the <global> section

might not work. Remember that the action definitions have their own schema version

as well and confirm that you are using supported features both at the workflow level

and the action level.

Schema version errors with action types:

The action schema versions are different

and often a lower number than the workflow schema version. Sometimes, users cut

and paste the same version from the workflow header and that may not be the right

version number. If you see the following error with a Hive action for instance, you

should check the version number (it is probably too high):

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

4 REPLIES 4

avatar
Master Guru

@omkar pathallapalli - Can you please provide your workflow.xml ?

avatar
Rising Star

Hi @Kuldeep Kulkarni here is my work flow

<workflow-app name="sqoop-wf" xmlns="uri:oozie:workflow:0.2">
  <start to="sqoop-import"/>
  <action name="sqoop-import">
  <sqoop xmlns="uri:oozie:sqoop-action:0.2">
  <job-tracker>${jobTracker}</job-tracker>
  <name-node>${nameNode}</name-node>
  <prepare>
  <delete path="${nameNode}/user/${wf:user()}/${examplesRoot}/output-data/sqoop"/>
  <mkdir path="${nameNode}/user/${wf:user()}/${examplesRoot}/output-data"/>
  </prepare>
  <configuration>
  <property>
   <name>mapred.job.queue.name</name>
  <value>${queueName}</value>
  </property>
  </configuration>
  <job-xml>/user/root/hbase-site.xml</job-xml>
  <command>import --connect "jdbc:sqlserver://<ip:port>;database=ESP_MFR" --table bundle --username uname --password password --incremental append --check-column packageid --hbase-table bundle --column-family bundleid</command>
  <file>/user/root/sqljdbc4.jar#sqljdbc4.jar</file>
  <file>/user/root/hbase/hbase-client.jar#hbase-client.jar</file>
  <file>/user/root/hbase/hbase-common.jar#hbase-common.jar</file>  
 <file>/user/root/hbase/hbase-protocol.jar#hbase/hbase-protocol.jar</file>
  <file>/user/root/hbase/htrace-core3.1.0-incubating.jar#htrace-core3.1.0-incubating.jar</file> 
 <file>/user/root/hbase/hbase-server.jar#hbase-server.jar</file> 
 <file>/user/root/hbase/hbase-hadoop-compat.jar#hbase-hadoop-compat.jar</file>
  <file>/user/root/hbase/high-scale-lib-1.1.1.jar#high-scale-lib-1.1.1.jar</file>
  
 </sqoop>
  <ok to="end"/>
  <error to="fail"/>
  </action>
  <kill name="fail">
  <message>Sqoop failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
  </kill>
  <end name="end"/>
</workflow-app>

avatar
Rising Star

i got it finally that i dind not follow the correct syntax job-xml should be above the configuration

<job-xml>/user/root/hbase-site.xml</job-xml>

<configuration>

<\configuration>

avatar
Master Guru

Yes, the order of elements in the xml workflow file is important, see below, "sequence" means that order must be exactly as given. Elements marked with minOccurs="0" are optional and can be omitted.

<xs:complexType name="ACTION">
        <xs:sequence>
            <xs:element name="job-tracker" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="name-node" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="prepare" type="sqoop:PREPARE" minOccurs="0" maxOccurs="1"/>
            <xs:element name="job-xml" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="configuration" type="sqoop:CONFIGURATION" minOccurs="0" maxOccurs="1"/>
            <xs:choice>
                <xs:element name="command" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="arg" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
            </xs:choice>
            <xs:element name="file" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="archive" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>