Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.3.2
-
None
-
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