velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Glass-Husain <>
Subject Re: Macros occasionally not parsing
Date Mon, 18 May 2009 20:25:47 GMT

The macro is defined in the template.  It looks like:

#set($rounds = $currRound - 1)
#macro(Dataset $decn $label $color $width)
    <dataset seriesName="$label"
			 anchorBorderColor="$color" >
		#foreach($step in [0..$rounds])
			<set value='$Values.get("$decn").getResult($step)'/>

and the call like this:
		#Dataset($decision, $decision, "$GraphColorList.get(5)", "2")

My macro option are:
        p.setProperty("velocimacro.library", "macro_library.fml");
        p.setProperty("velocimacro.context.localscope", "true");

Let me know if you see anything useful.  We originally had this
problem under Velocity 1.5 so I upgraded to 1.6.2.   I'll set up a
test case under load, see if I can replicate it.


On Mon, May 18, 2009 at 1:06 PM, Nathan Bubna <> wrote:
> I haven't seen this with 1.6.2, but none of my current projects are
> under any load (yet).  Just to clarify, is the macro defined and used
> in the template or just used in the template?  And for completeness,
> what are your macro settings?
> On Mon, May 18, 2009 at 12:58 PM, Will Glass-Husain
> <> wrote:
>> Hi,
>> I'm having problems with templates that are occasionally not parsing
>> macros.  The macro appears literally in the body of the result:
>> #somemacro($argument)
>> The error occurs under load in a webapp (e.g. when the same template
>> is being retrieved simultaneously).  I know it's not a template error
>> since the same template will work fine in one call and then not run
>> the macro in the next.
>> I seem to remember this was an issue with early versions of Velocity,
>> but I just upgraded to 1.6.2 and still see the problem.  Anyone else
>> see this issue?
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message