Hi,
My Oozie server version: 4.0.0-cdh5.3.2
I have a variable A, the value of which would be a combination of
other variables (B, C etc.). However, oozie is unable to recognize and
substitute values from B, C to form value of A. It throws:
javax.servlet.jsp.el.ELException: variable [param1] cannot be resolved
Please let me know if it is a known issue in the version I am using.
Here is a simple workflow example I am trying:
<workflow-app name="test-sunil-wf" xmlns="uri:oozie:workflow:0.4">
<global>
<configuration>
<property>
<name>param1</name>
<value>idHere</value>
</property>
</configuration>
</global>
<start to="test-echo-shell-1"/>
<action name="test-echo-shell-1">
<shell xmlns="uri:oozie:shell-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<exec>/bin/echo</exec>
<argument>${param1}</argument>
<capture-output/>
</shell>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
The above example throws:
javax.servlet.jsp.el.ELException: variable [param1] cannot be resolved
at
org.apache.oozie.util.ELEvaluator$Context.resolveVariable(ELEvaluator.java:106)
at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
at org.apache.commons.el.ExpressionString.evaluate(ExpressionString.java:114)
at
org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:274)
at
org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
at org.apache.oozie.util.ELEvaluator.evaluate(ELEvaluator.java:203)
at
org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:188)
at
org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:63)
at org.apache.oozie.command.XCommand.call(XCommand.java:281)
at
org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:323)
at
org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:252)
at
org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
Here is another example which fails. This is somewhat similar to my
real use-case:
<workflow-app name="test-sunil-wf" xmlns="uri:oozie:workflow:0.4">
<start to="test-echo-shell-1"/>
<action name="test-echo-shell-1">
<shell xmlns="uri:oozie:shell-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>param1</name>
<value>${wf:id()}</value>
</property>
<property>
<name>param2</name>
<value>${wf:name()}</value>
</property>
<property>
<name>param3</name>
<value>${param1} and ${param2}</value>
</property>
</configuration>
<exec>/bin/echo</exec>
<argument>${param3}</argument>
<capture-output/>
</shell>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
The above XML fails with the same stacktrace as shown above.
Thanks
Sunil