Hi all,

As the original poster of this message, I did eventually get the answer..  I
think the issue (it was a while ago) was that there was an extra carriage
return on unique.vm.  I also had to play around with the table ID,
eventually ending up with NONE to force it to use MSSQL identity columns.

The other reason I had problems was I heavily hacked a download of
turbine-torque to generate my .xml file.  I then used that version of torque
to generate my OM.  When I copied the .java files over to my tdk2.1
installation, they all failed because the OM files all reference torque, but
the TDK expected them to reference itself.  This was because of the
decoupling process going on for Torque.  

I think there are other emails posted on getting SQL server to work with the
default TDK 2.1.

Eric

-----Original Message-----
From: James Coltman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 27, 2001 6:14 AM
To: [EMAIL PROTECTED]
Subject: RE: Followup: RE: Running Ant Init task for Microsoft SQL
server


Did anyone ever manage to find out what the problem described in this mail
was?

James

-----Original Message-----
From: Pugh, Eric [mailto:[EMAIL PROTECTED]]
Sent: 12 September 2001 14:46
To: '[EMAIL PROTECTED]'
Subject: Followup: RE: Running Ant Init task for Microsoft SQL server


I downloaded and tried to run torque by itself, and continued to get the
same problem...  I have velocity installed, and have successfully used it
before.  Could it be possible that the current release version of velocity
(1.1) that I downloaded and have been using is incompatable with Torque, and
that the version being used in not the velocity that comes with torque?

I don't have Velocity in my PATH statement or classpath.

Or is it that the table.vm file for MS SQL server is incorrent?

I am running on Windows 2K with MS SQL.

Eric

Here is my velocity log:
Wed Sep 12 09:29:22 EDT 2001   [info] ResourceManager : found
sql/base/mssql/columns.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Wed Sep 12 09:29:22 EDT 2001   [info] ResourceManager : found
sql/base/mssql/primarykey.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Wed Sep 12 09:29:22 EDT 2001   [info] ResourceManager : found
sql/base/mssql/unique.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Wed Sep 12 09:29:22 EDT 2001  [error] Method chop threw exception for
reference $strings in template sql/base/mssql/table.vm at  [14,24]
Wed Sep 12 09:29:22 EDT 2001  [error] Method parse threw exception for
reference $generator in template sql/base/Control.vm at  [17,17]

-----Original Message-----
From: Pugh, Eric [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 11, 2001 4:59 PM
To: '[EMAIL PROTECTED]'
Subject: Running Ant Init task for Microsoft SQL server


Hi,

I have implemented and played around with Velocity, and am now trying to
integrate Turbine in with it.  However, as I try and compile the sample
application "newapp", I am running into problems with the ant init task.

I get this error below:

C:\java\tdk-2.1\tdk\webapps\newapp\WEB-INF\build>ant init
Buildfile: build.xml

init:

init-tasks:

set-os:

set-windows2000:

set-windowsNT:

set-windows98:

set-unix:

unix-ext:

windows-ext:

ext:
     [echo] Platform = windows
     [echo] Extension = bat

create-database:

init-tasks:

turbine-sql:
     [echo] +------------------------------------------+
     [echo] |                                          |
     [echo] | Generating SQL for Turbine base system!  |
     [echo] |                                          |
     [echo] +------------------------------------------+
C:\java\tdk-2.1\tdk\webapps\newapp\WEB-INF\src\sql\turbine-schema.sql

BUILD FAILED

C:\java\tdk-2.1\tdk\webapps\newapp\WEB-INF\build\build.xml:207: Exception
thrown by 'generator.parse'. For more informat
ion consult the velocity log.
--- Nested Exception ---
org.apache.velocity.exception.MethodInvocationException: Invocation of
method 'chop' in  class org.apache.velocity.util.
StringUtils threw exception class java.lang.ArrayIndexOutOfBoundsException
        at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java)
        at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.ja
va)
        at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.jav
a)
        at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java)
        at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement
.java)
        at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java)
        at org.apache.velocity.Template.merge(Template.java)
        at org.apache.velocity.texen.Generator.parse(Generator.java)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java)
        at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.ja
va)
        at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.jav
a)
        at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java)
        at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement
.java)
        at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java)
        at
org.apache.velocity.runtime.directive.Foreach.render(Foreach.java)
        at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.jav
a)
        at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java)
        at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java)
        at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement
.java)
        at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java)
        at
org.apache.velocity.runtime.directive.Foreach.render(Foreach.java)
        at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.jav
a)
        at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java)
        at org.apache.velocity.Template.merge(Template.java)
        at org.apache.velocity.texen.Generator.parse(Generator.java)
        at org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:124)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)

The last couple lines of the velocity log are:

Tue Sep 11 16:51:12 EDT 2001   [info] ResourceManager : found
sql/base/mssql/table.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Sep 11 16:51:12 EDT 2001   [info] ResourceManager : found
sql/base/mssql/drop.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Sep 11 16:51:12 EDT 2001   [info] ResourceManager : found
sql/base/mssql/columns.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Sep 11 16:51:12 EDT 2001   [info] ResourceManager : found
sql/base/mssql/primarykey.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Sep 11 16:51:12 EDT 2001   [info] ResourceManager : found
sql/base/mssql/unique.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Sep 11 16:51:12 EDT 2001  [error] Method chop threw exception for
reference $strings in template sql/base/mssql/table.vm at  [14,24]
Tue Sep 11 16:51:12 EDT 2001  [error] Method parse threw exception for
reference $generator in template sql/base/Control.vm at  [28,17]

If I comment out the call to the task turbine-sql  then it will fail later
on when it does the inserts...  Does someone have a version of the
turbine-schema.sql that is already compiled that I could use?  Will I have
this problem when I try and compile my own sql for the newapp project?

Thanks,

Eric

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

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



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

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

Reply via email to