If I correctly understood the issue here, then the problem is just with binding 
jvmOptions variable in workflow. If so, then I would suggest to use wf:conf EL 
function. Something like:

<java-opts>${wf:conf('jvmOptions')}</java-opts>

This wf:conf EL function will never fail - it will either return $jvmOptions 
value or nothing in case that it's not defined (or empty in your case).

Jarcec

On Tue, Jun 05, 2012 at 10:02:17PM +0530, Harsh J wrote:
> This sounds like a bug. We'd have to fix the java-opts resolving to
> allow blank options if passed. Can you please file a JIRA?
> 
> For the moment, is it possible for you to pass a dummy var such as
> "-Dcom.foo.bar.uselessprop=uselessvalue" to the java-opts when nothing
> is needed?
> 
> On Tue, Jun 5, 2012 at 9:54 PM, John Armstrong <[email protected]> wrote:
> > Hi, everybody.
> >
> > I'm trying to use a single workflow to kick off my Java Tools.  A few of the
> > tools take some JVM options to run properly, but most don't.  I'm using a
> > Java action like this:
> >
> > <java>
> >  <job-tracker>${jobTracker}</job-tracker>
> >  <name-node>${nameNode}</name-node>
> >  <job-xml>${spinozaConfigFile}</job-xml>
> >  <main-class>${toolClass}</main-class>
> >  <java-opts>${jvmOptions}</java-opts>
> >  <arg>${commandLineProperties}</arg>
> > </java>
> >
> > My problem is that I can't figure out what to do when I don't need to add
> > any JVM options.  I'd hoped that passing an empty string -- jvmOptions == ""
> > -- would do the trick, but it seems that when I pass this in through
> > OozieClient it gets trimmed to "no value", and then the workflow complains
> > that it can't resolve the EL expression.  I tried making it be a single
> > space -- jvmOptions == " " -- but that gets trimmed as well.
> >
> > So, are there any ideas?  Is it possible to include the java-opts tag if and
> > only if ${jvmOptions} can be resolved?
> >
> > Thanks.
> 
> 
> 
> -- 
> Harsh J

Attachment: signature.asc
Description: Digital signature

Reply via email to