AnsweredAssumed Answered

Unable to run shell action in Oozie 3.3.2

Question asked by psbora on May 17, 2015
Latest reply on Sep 27, 2017 by Selva
Hi, I am trying to run shell action from the example provided with MapR distribution. I am getting following error.

**Command:**

    /opt/mapr/oozie/oozie-3.3.2/bin/oozie job -oozie http://gold-oozie.db.aexp.com:11000/oozie/ -config /idn/home/uslcg/oozie/examples/apps/shell/job.properties -run
    
**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 'shell'.

Job Properties:

    nameNode=maprfs:///
    jobTracker=maprfs:///
    queueName=default
    examplesRoot=examples
    
    #oozie.wf.application.path=maprfs:/oozie/${examplesRoot}/apps/shell
    oozie.wf.application.path=maprfs:/idn/home/uslcg/oozie/${examplesRoot}/apps/shell
    
**workflow.xml**

    <workflow-app xmlns="uri:oozie:workflow:0.4" name="shell-wf-mytest">
        <start to="shell-node"/>
        <action name="shell-node">
            <shell xmlns="uri:oozie:shell-action:0.2">
                <job-tracker>${jobTracker}</job-tracker>
                <name-node>${nameNode}</name-node>
                <configuration>
                    <property>
                        <name>mapred.job.queue.name</name>
                        <value>${queueName}</value>
                    </property>
                </configuration>
                <exec>echo</exec>
                <argument>my_output=Hello Oozie</argument>
                <capture-output/>
            </shell>
            <ok to="check-output"/>
            <error to="fail"/>
        </action>
        <decision name="check-output">
            <switch>
                <case to="end">
                    ${wf:actionData('shell-node')['my_output'] eq 'Hello Oozie'}
                </case>
                <default to="fail-output"/>
            </switch>
        </decision>
        <kill name="fail">
            <message>Shell action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
        </kill>
        <kill name="fail-output">
            <message>Incorrect output, expected [Hello Oozie] but was [${wf:actionData('shell-node')['my_output']}]</message>
        </kill>
        <end name="end"/>
    </workflow-app>
    


Outcomes