db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mirna Ajanovic" <m_ajano...@hotmail.com>
Subject Re: Newbie troubles building the tutorial with SQL server
Date Tue, 04 Mar 2003 16:15:50 GMT
My id-table-schema.xml file has that information at the top of it:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE database SYSTEM
"http://jakarta.apache.org/turbine/dtd/database.dtd">

My build-torque.xml does not have anything at the top of it.

Mirna
----- Original Message -----
From: "Jim Schneider" <jschneider@kjinteractive.com>
To: "Turbine Torque Users List" <torque-user@db.apache.org>
Sent: Tuesday, March 04, 2003 11:07 AM
Subject: Re: Newbie troubles building the tutorial with SQL server


> I assume you have the following at the top of your XML file:
>
> <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
> <!DOCTYPE database SYSTEM
>  "http://jakarta.apache.org/turbine/dtd/database.dtd">
>
>
>
> Mirna Ajanovic wrote:
>
> >I apologize if this is posted more then once, I have been having some
trouble with my email program.
> >
> >I have downloaded the version 3.0 of Torque and am trying to run the
tutorial with SQL server.  I'm using ant version 1.5 and jdk 1.4.0_01.
> >
> >I have followed Step 1 and 2 and changed build.properties and
Torque.properties according to the instructions.
> >
> >The changes that I have made to Torque.properties are as follows:
> >torque.database.bookstore.adapter=mssql
> >
> >## Using torque's old pool
>
>torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.TorqueDataSo
urceFactory
> >torque.dsfactory.bookstore.pool.defaultMaxConnections=10
> >torque.dsfactory.bookstore.pool.maxExpiryTime=3600
> >torque.dsfactory.bookstore.pool.connectionWaitTimeout=10
> >torque.dsfactory.bookstore.connection.driver =
com.microsoft.jdbc.sqlserver.SQLServerDriver
> >torque.dsfactory.bookstore.connection.url =
jdbc:microsoft:sqlserver://localhost:4393;DatabaseName=bookstore;SelectMetho
d=cursor
> >torque.dsfactory.bookstore.connection.user = sa
> >torque.dsfactory.bookstore.connection.password = welcome
> >
> >
> >I have made the following changes in build.properties file:
> ># -------------------------------------------------------------------
> >#
> >#  P R O J E C T
> >#
> ># -------------------------------------------------------------------
> >torque.project = bookstore
> >
> >
> ># -------------------------------------------------------------------
> >#
> >#  T A R G E T  D A T A B A S E
> >#
> ># -------------------------------------------------------------------
> >torque.database = mssql
> >
> ># -------------------------------------------------------------------
> >#
> >#  O B J E C T  M O D E L  I N F O R M A T I O N
> >#
> ># -------------------------------------------------------------------
> >torque.targetPackage = com.kazmier.om
> >
> ># -------------------------------------------------------------------
> >#
> >#  D A T A B A S E  S E T T I N G S
> >#
> ># -------------------------------------------------------------------
> >torque.database.createUrl =
jdbc:microsoft:sqlserver://localhost:4393;DatabaseName=bookstore;SelectMetho
d=cursor;User=sa;Password=welcome
> >torque.database.buildUrl =
jdbc:microsoft:sqlserver://localhost:4393;DatabaseName=bookstore;SelectMetho
d=cursor;User=sa;Password=welcome
> >torque.database.url =
jdbc:microsoft:sqlserver://localhost:4393;DatabaseName=bookstore;SelectMetho
d=cursor;User=sa;Password=welcome
> >torque.database.createUrl =
jdbc:microsoft:sqlserver://localhost:4393;DatabaseName=bookstore;SelectMetho
d=cursor
> >torque.database.buildUrl =
jdbc:microsoft:sqlserver://localhost:4393;DatabaseName=bookstore;SelectMetho
d=cursor
> >torque.database.url =
jdbc:microsoft:sqlserver://localhost:4393;DatabaseName=bookstore;SelectMetho
d=cursor
> >torque.database.driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
> >torque.database.user = sa
> >torque.database.password = welcome
> >torque.database.host = localhost
> >
> >torque.sameJavaName = false
> >
> >My id-table-schema.xml file looks like this:
> >
> ><database name="bookstore">
> >  <table name="ID_TABLE" idMethod="idbroker">
> >    <column name="ID_TABLE_ID" required="true" primaryKey="true"
type="INTEGER"/>
> >    <column name="TABLE_NAME" required="true" size="255" type="VARCHAR"/>
> >    <column name="NEXT_ID" type="INTEGER"/>
> >    <column name="QUANTITY" type="INTEGER"/>
> >
> >    <unique>
> >      <unique-column name="TABLE_NAME"/>
> >    </unique>
> >
> >  </table>
> ></database>
> >
> >I have also created bookstore-schema.xml according to tutorial
instructions.  I tried building the project with he following command:
ant -f build-torque.xml
> >and I get the following error:
> >C:\Tools\torque\3.0>ant -f build-torque.xml
> >Buildfile: build-torque.xml
> >
> >main:
> >
> >check-use-classpath:
> >
> >check-run-only-on-schema-change:
> >
> >sql-check:
> >
> >sql:
> >     [echo] +------------------------------------------+
> >     [echo] |                                          |
> >     [echo] | Generating SQL for YOUR Torque project!  |
> >     [echo] | Woo hoo!                                 |
> >     [echo] |                                          |
> >     [echo] +------------------------------------------+
> >
> >sql-classpath:
> >
> >sql-template:
> >     [echo] mssql
> >[torque-sql] Using contextProperties file:
C:\Tools\torque\3.0\build.properties
> >[torque-sql] Generating to file
C:\Tools\torque\3.0\src\sql\report.bookstore.sql.generation
> >[torque-sql] Fatal Error [line 1, row 1]: Content is not allowed in
prolog.
> >[torque-sql] org.xml.sax.SAXParseException: Content is not allowed in
prolog.
> >[torque-sql]    at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:
> >[torque-sql]    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
> >[torque-sql]    at
org.apache.torque.engine.database.transform.XmlToAppData.parseFile(XmlToA
> >[torque-sql]    at
org.apache.torque.task.TorqueDataModelTask.initControlContext(TorqueDataM
> >[torque-sql]    at
org.apache.torque.task.TorqueSQLTask.initControlContext(TorqueSQLTask.jav
> >[torque-sql]    at
org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:480)
> >[torque-sql]    at org.apache.tools.ant.Task.perform(Task.java:317)
> >[torque-sql]    at org.apache.tools.ant.Target.execute(Target.java:309)
> >[torque-sql]    at
org.apache.tools.ant.Target.performTasks(Target.java:334)
> >[torque-sql]    at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >[torque-sql]    at
org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
> >[torque-sql]    at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
> >[torque-sql]    at org.apache.tools.ant.Task.perform(Task.java:317)
> >[torque-sql]    at org.apache.tools.ant.Target.execute(Target.java:309)
> >[torque-sql]    at
org.apache.tools.ant.Target.performTasks(Target.java:334)
> >[torque-sql]    at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >[torque-sql]    at
org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
> >[torque-sql]    at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
> >[torque-sql]    at org.apache.tools.ant.Task.perform(Task.java:317)
> >[torque-sql]    at org.apache.tools.ant.Target.execute(Target.java:309)
> >[torque-sql]    at
org.apache.tools.ant.Target.performTasks(Target.java:334)
> >[torque-sql]    at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >[torque-sql]    at
org.apache.tools.ant.Project.executeTargets(Project.java:1250)
> >[torque-sql]    at org.apache.tools.ant.Main.runBuild(Main.java:610)
> >[torque-sql]    at org.apache.tools.ant.Main.start(Main.java:196)
> >[torque-sql]    at org.apache.tools.ant.Main.main(Main.java:235)
> >[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
> >file:C:/Tools/torque/3.0/build-torque.xml:216: Generation failed. For
more information consult the velocity log, or invoke ant with the -debug
flag.
> >
> >I tried running the above command with the debug flag and this is what I
get:
> >BUILD FAILED
> >file:C:/Tools/torque/3.0/build-torque.xml:216: Generation failed. For
more information consult the velocity log, or invoke ant with the -debug
flag.
> >        at
org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:579)
> >        at org.apache.tools.ant.Task.perform(Task.java:317)
> >        at org.apache.tools.ant.Target.execute(Target.java:309)
> >        at org.apache.tools.ant.Target.performTasks(Target.java:334)
> >        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
> >        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
> >        at org.apache.tools.ant.Task.perform(Task.java:317)
> >        at org.apache.tools.ant.Target.execute(Target.java:309)
> >        at org.apache.tools.ant.Target.performTasks(Target.java:334)
> >        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
> >        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
> >        at org.apache.tools.ant.Task.perform(Task.java:317)
> >        at org.apache.tools.ant.Target.execute(Target.java:309)
> >        at org.apache.tools.ant.Target.performTasks(Target.java:334)
> >        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
> >        at org.apache.tools.ant.Main.runBuild(Main.java:610)
> >        at org.apache.tools.ant.Main.start(Main.java:196)
> >        at org.apache.tools.ant.Main.main(Main.java:235)
> >--- Nested Exception ---
> >java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> >        at java.util.ArrayList.RangeCheck(ArrayList.java:508)
> >        at java.util.ArrayList.get(ArrayList.java:320)
> >        at
org.apache.torque.engine.database.model.AppData.getDatabase(AppData.java:222
)
> >        at
org.apache.torque.task.TorqueDataModelTask.initControlContext(TorqueDataMode
lTask.java:350)
> >        at
org.apache.torque.task.TorqueSQLTask.initControlContext(TorqueSQLTask.java:2
20)
> >        at
org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:480)
> >        at org.apache.tools.ant.Task.perform(Task.java:317)
> >        at org.apache.tools.ant.Target.execute(Target.java:309)
> >        at org.apache.tools.ant.Target.performTasks(Target.java:334)
> >        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
> >        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
> >        at org.apache.tools.ant.Task.perform(Task.java:317)
> >        at org.apache.tools.ant.Target.execute(Target.java:309)
> >        at org.apache.tools.ant.Target.performTasks(Target.java:334)
> >        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
> >        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
> >        at org.apache.tools.ant.Task.perform(Task.java:317)
> >        at org.apache.tools.ant.Target.execute(Target.java:309)
> >        at org.apache.tools.ant.Target.performTasks(Target.java:334)
> >        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
> >        at org.apache.tools.ant.Main.runBuild(Main.java:610)
> >        at org.apache.tools.ant.Main.start(Main.java:196)
> >        at org.apache.tools.ant.Main.main(Main.java:235)
> >
> >Has anyone ran into this problem before?  Is there something that I'm
doing wrong?  If someone has successfully ran the tutorial with sql server I
would greatly appreciate your help.
> >
> >Thanks,
> >Mirna
> >
> >
> >
>
> --
> Jim Schneider
> KJ Interactive, Inc.
> 303-765-1357
> www.kjinteractive.com
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>

Mime
View raw message