Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-2117

wf:errorMessage JDOMParseException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.3.2
    • Fix Version/s: None
    • Component/s: workflow
    • Labels:
      None

      Description

      We get job failure while sending email notification when we have any xml reserved strings in errorMessage(..) .
      This can be easily reproduced by running code which will have xml tag in its error message .

      Example to throw an exception with error message:

      if (0 == 0) {
          throw new RuntimeException("I have xml tag <someTag>");
       }
      

      Issue at line:

      ${wf:errorMessage(wf:lastErrorNode())}
      

      Error:

      JDOMParseException: Error on line 36: The element type \"someTag\" must be terminated by the matching end-tag \"</someTag>\".
      

      Workflow job failure syntax:

      <!-- Email on Failure-->
         <action name="fail">
            <email xmlns="uri:oozie:email-action:0.1">
               <to>${toEmailList}</to>
               <subject>Oozie FAILURE in Example- Workflow: ${wf:name()}</subject>
               <body>${wf:name()}, ${wf:id()} failed, error message[${wf:errorMessage(wf:lastErrorNode())}].</body>
            </email>
            <ok to="kill-fail" />
            <error to="kill-fail" />
         </action>
         <kill name="kill-fail">
            <message>${wf:name()} failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
         </kill>
      

      Issue observed at => Oozie client build version: 3.3.2-cdh4.6.0

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              akku87 Akshay Dange
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: