the table generation template, templates/sql/base/postgresql/table.vm, works
fine on UNIX.  When I try the same project-sql task on Windows + cygwin I
get this error from Velocity:

2002-04-12 13:17:35,300 - Method chop threw exception for reference $strings
in template sql/base/postgresql/table.vm at  [17,25]
2002-04-12 13:17:35,300 - Method parse threw exception for reference
$generator
in template sql/base/Control.vm at  [17,7]

the offending line is

#if($index.length() > 0)$strings.chop($index,1)#end

if I change this to eliminate chop:

#if($index.length() > 0)$index#end

it works, but I end up with an extra blank line in each table definition.
Presumably that blank line is a character that *should have been* removed
with the call to $strings.chop--so if the extra newline char is there, why
might $strings.chop not see it?

My *.vm files are in UNIX mode (newline == LF).  Maybe Velocity is not
recognizing the LF as a line terminator because Java is running on Windows?
The generated .SQL file is created in UNIX mode too, which should be ok
because there's no transalation going on.  And I'd be happy if all the files
just stayed in UNIX mode.

Any ideas?

Thanks,

-- Bill


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to