appending an extra new-line at the end of
templates/sql/base/postgresql/index.vm fixes the problem and it works for me
on both linux and windows now.  At worst, there might be an extra newline in
the generated SQL, but it seems to be unaffected.  I will submit a patch to
the dev list.

-- Bill

----- Original Message -----
From: "Steve" <[EMAIL PROTECTED]>
To: "Turbine Torque Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 3:53 PM
Subject: Re: Cannot run ant using Torque-3.0-b2


> Thanks for replying.
>
> I am using PostgreSQL. I did not change *anything* in the downloaded
config,
> and by default, the .properties have selected postgresql. Because you
asked
> about databases, I just now added the postgresql-7.1-1.2.jar to the lib;
> there was no change.
>
> After your email, I also tried using notepad to modify project-schema.xml,
> sql/base/table.vm, and sql/control.vm to change all the newline's. Still
the
> exact same errors.
>
> Any help is much appreciated. I am happy to experiment if anyone has any
> ideas - I'm kinda stuck at this point.
>
> TIA,
> Steve
>
>
> ----- Original Message -----
> From: "Bill Schneider" <[EMAIL PROTECTED]>
> To: "Turbine Torque Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, May 21, 2002 3:26 PM
> Subject: Re: Cannot run ant using Torque-3.0-b2
>
>
> > What database are you using?  I've had a similar problem on Windows and
> > haven't been able to track it down.  The same schema/db combo worked
fine
> on
> > UNIX.  I suspect it might be something funny about differences in
newline
> > conventions between the platforms.  Maybe I ought to try reproducing
> outside
> > of Torque--I think the problem might really be with Velocity.
> >
> > -- Bill
> > ----- Original Message -----
> > From: "Steve" <[EMAIL PROTECTED]>
> > To: "Turbine Torque Users List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, May 21, 2002 6:14 PM
> > Subject: Cannot run ant using Torque-3.0-b2
> >
> >
> > I just downloaded torque-3.0-b2 onto my Windows system. I changed to the
> > torque folder and typed ant (that is to say, I changed no files or
> > properties yet). I cannot get ant to compile the files. I have some
> schemata
> > and files I created on an earlier version that I would like to recompile
> on
> > the latest version of Torque (to see if my postgresql bugs go away).
> >
> > Can someone tell me what is wrong? Here is the relevant info:
> >
> > project-sql:
> >      [echo] +------------------------------------------+
> >      [echo] |                                          |
> >      [echo] | Generating SQL for YOUR Turbine project! |
> >      [echo] | Woo hoo!                                 |
> >      [echo] |                                          |
> >      [echo] +------------------------------------------+
> > [torque-sql] Using contextProperties file:
> > C:\developer\torque-3.0b2\build.prope
> > rties
> > [torque-sql] Generating to file
> > C:\developer\torque-3.0b2\src\sql\report.booksto
> > re.sql.generation
> > [torque-sql] Resolver: used database.dtd from
> > org.apache.torque.engine.database.
> > transform package
> > [torque-sql] Resolver: used database.dtd from
> > org.apache.torque.engine.database.
> > transform package
> > [torque-sql] Resolver: used database.dtd from
> > org.apache.torque.engine.database.
> > transform package
> > [torque-sql] Resolver: used database.dtd from
> > org.apache.torque.engine.database.
> > transform package
> >
> > BUILD FAILED
> >
> > C:\developer\torque-3.0b2\build.xml:75: Exception thrown by
> > 'generator.parse'. F
> > or more information consult the velocity log, or invoke ant with
> the -debug
> > flag
> >
> > The last few lines of my velocit.log say...
> >
> > org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > 2002-05-21 15:08:27,975 - ResourceManager : found
> > sql/base/postgresql/unique.vm with loader
> > org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > 2002-05-21 15:08:27,995 - ResourceManager : found
> > sql/base/postgresql/index.vm with loader
> > org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > 2002-05-21 15:08:27,995 - Method chop threw exception for reference
> $strings
> > in template sql/base/postgresql/table.vm at  [17,25]
> > 2002-05-21 15:08:27,995 - Method parse threw exception for reference
> > $generator in template sql/base/Control.vm at  [17,7]
> >
> > running ant -debug says...
> >
> >
> > BUILD FAILED
> >
> > C:\developer\torque-3.0b2\build.xml:75: Exception thrown by
> > 'generator.parse'. F
> > or more information consult the velocity log, or invoke ant with
> the -debug
> > flag
> > .
> >         at
> > org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:564)
> >         at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104)
> >         at org.apache.tools.ant.Task.perform(Task.java:217)
> >         at org.apache.tools.ant.Target.execute(Target.java:184)
> >         at org.apache.tools.ant.Target.performTasks(Target.java:202)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> >         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266)
> >         at
> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:120)
> >
> >         at org.apache.tools.ant.Task.perform(Task.java:217)
> >         at org.apache.tools.ant.Target.execute(Target.java:184)
> >         at org.apache.tools.ant.Target.performTasks(Target.java:202)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> >         at org.apache.tools.ant.Project.executeTargets(Project.java:560)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:454)
> >         at org.apache.tools.ant.Main.start(Main.java:153)
> >         at org.apache.tools.ant.Main.main(Main.java:176)
> > --- Nested Exception ---
> > org.apache.velocity.exception.MethodInvocationException: Invocation of
> > method 'c
> > hop' in  class org.apache.velocity.util.StringUtils threw exception
class
> > java.l
> > ang.ArrayIndexOutOfBoundsException : null
> >         at
> > org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.j
> > ava:308)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTRefer
> > ence.java:207)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTReference.render(ASTRefere
> > nce.java:250)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
> > :94)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfSt
> > atement.java:109)
> >         at
> > org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.
> > java:271)
> >         at org.apache.velocity.Template.merge(Template.java:296)
> >         at org.apache.velocity.texen.Generator.parse(Generator.java:425)
> >         at org.apache.velocity.texen.Generator.parse(Generator.java:361)
> >         at java.lang.reflect.Method.invoke(Native Method)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.j
> > ava:259)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTRefer
> > ence.java:207)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTReference.render(ASTRefere
> > nce.java:250)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
> > :94)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfSt
> > atement.java:109)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
> > :94)
> >         at
> > org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344
> > )
> >         at
> > org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirect
> > ive.java:153)
> >         at
> > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
> > :94)
> >         at
> > org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344
> > )
> >         at
> > org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirect
> > ive.java:153)
> >         at
> > org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.
> > java:271)
> >         at org.apache.velocity.Template.merge(Template.java:296)
> >         at org.apache.velocity.texen.Generator.parse(Generator.java:451)
> >         at
> > org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:552)
> >         at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104)
> >         at org.apache.tools.ant.Task.perform(Task.java:217)
> >         at org.apache.tools.ant.Target.execute(Target.java:184)
> >         at org.apache.tools.ant.Target.performTasks(Target.java:202)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> >         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266)
> >         at
> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:120)
> >
> >         at org.apache.tools.ant.Task.perform(Task.java:217)
> >         at org.apache.tools.ant.Target.execute(Target.java:184)
> >         at org.apache.tools.ant.Target.performTasks(Target.java:202)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> >         at org.apache.tools.ant.Project.executeTargets(Project.java:560)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:454)
> >         at org.apache.tools.ant.Main.start(Main.java:153)
> >         at org.apache.tools.ant.Main.main(Main.java:176)
> >




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

Reply via email to