When trying to run the setup-db ant task from the build file, I am
getting an error coming from the build-torque.xml file.
I modified builds.properties and OJB.properties to fit my test project
but can get it to run.

I created the database first in MySQL 5.0
I am able to build the project. But when I run setup-db, here is the log
from the console:

Buildfile: /home/lsacaut/projets/product_manager_8/build.xml
compile:
xdoclet:
[ojbdoclet] 2006-02-24 16:07:00,636 [main] INFO 
xdoclet.XDocletMain.start - Running <ojbrepository/>
[ojbdoclet] 2006-02-24 16:07:00,936 [main] INFO 
xdoclet.XDocletMain.start - Running <torqueschema/>
setup-db:
     [copy] Copying 1 file to
/home/lsacaut/projets/product_manager_8/build/database
check-use-classpath:
check-run-only-on-schema-change:
sql-check:
sql:
     [echo] +------------------------------------------+
     [echo] |                                          |
     [echo] | Generating SQL for YOUR Torque project!  |
     [echo] |                                          |
     [echo] +------------------------------------------+
sql-classpath:
     [echo] loading templates from classpath
[torque-sql] Using contextProperties file:
/home/lsacaut/projets/product_manager_8/build.properties
[torque-sql] Using classpath
[torque-sql] Generating to file
/home/lsacaut/projets/product_manager_8/build/database/report.product_manager_8.sql.generation
[torque-sql] 2006-02-24 16:07:01,992 [main] INFO 
org.apache.torque.engine.database.transform.XmlToAppData - Parsing file:
'ojbcore-schema.xml'
[torque-sql] 2006-02-24 16:07:01,998 [main] INFO 
org.apache.torque.engine.database.transform.DTDResolver - Resolver: used
database.dtd from 'org.apache.torque.engine.database.transform' package
[torque-sql] 2006-02-24 16:07:02,051 [main] INFO 
org.apache.torque.engine.database.transform.XmlToAppData - Parsing file:
'project-schema.xml'
[torque-sql] 2006-02-24 16:07:02,053 [main] INFO 
org.apache.torque.engine.database.transform.DTDResolver - Resolver: used
'http://db.apache.org/torque/dtd/database_3_2.dtd'
sql-template:
create-db-check:
create-db:
[torque-data-model] Using classpath
[torque-data-model] Generating to file
/home/lsacaut/projets/product_manager_8/build/database/create-db.sql
[torque-data-model] 2006-02-24 16:07:03,294 [main] INFO 
org.apache.torque.engine.database.transform.XmlToAppData - Parsing file:
'ojbcore-schema.xml'
[torque-data-model] 2006-02-24 16:07:03,297 [main] INFO 
org.apache.torque.engine.database.transform.DTDResolver - Resolver: used
database.dtd from 'org.apache.torque.engine.database.transform' package
[torque-data-model] 2006-02-24 16:07:03,334 [main] INFO 
org.apache.torque.engine.database.transform.XmlToAppData - Parsing file:
'project-schema.xml'
[torque-data-model] 2006-02-24 16:07:03,336 [main] INFO 
org.apache.torque.engine.database.transform.DTDResolver - Resolver: used
'http://db.apache.org/torque/dtd/database_3_2.dtd'
shutdown-check:
append-shutdown-sql:
     [echo] Executing the create-db.sql script ...
      [sql] Executing file:
/home/lsacaut/projets/product_manager_8/build/database/create-db.sql
      [sql] 2 of 2 SQL statements executed successfully
insert-sql:
[torque-sql-exec] Our new url -> jdbc:mysql://localhost/product_manager_8
[torque-sql-exec] Executing file:
/home/lsacaut/projets/product_manager_8/build/database/project-schema.sql
[torque-sql-exec] Failed to execute: #
-----------------------------------------------------------------------
[torque-sql-exec] # Client #
-----------------------------------------------------------------------
[torque-sql-exec] drop table if exists Client; CREATE TABLE Client ( id
INTEGER NOT NULL, firstname VARCHAR (100), lastname VARCHAR (100),
address1 VARCHAR (255), address2 VARCHAR (255), city VARCHAR (100),
province VARCHAR (2), PRIMARY KEY(id) ); #
-----------------------------------------------------------------------
[torque-sql-exec] # Product #
-----------------------------------------------------------------------
[torque-sql-exec] drop table if exists Product; CREATE TABLE Product (
id INTEGER NOT NULL, name VARCHAR (100), price FLOAT, stock INTEGER,
PRIMARY KEY(id) );
[torque-sql-exec] java.sql.SQLException: Syntax error or access
violation,  message from server: "You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near '; CREATE TABLE Client ( id INTEGER NOT NULL,
firstname VARCHAR (100), lastname V' at line 3"
[torque-sql-exec] Executing file:
/home/lsacaut/projets/product_manager_8/build/database/ojbcore-schema.sql
[torque-sql-exec] Failed to execute: #
-----------------------------------------------------------------------
[torque-sql-exec] # OJB_HL_SEQ #
-----------------------------------------------------------------------
[torque-sql-exec] drop table if exists OJB_HL_SEQ; CREATE TABLE
OJB_HL_SEQ ( TABLENAME VARCHAR (250) NOT NULL, MAX_KEY BIGINT, GRAB_SIZE
INTEGER, VERSION INTEGER, PRIMARY KEY(TABLENAME) ); #
-----------------------------------------------------------------------
[torque-sql-exec] # OJB_NRM #
-----------------------------------------------------------------------
[torque-sql-exec] drop table if exists OJB_NRM; CREATE TABLE OJB_NRM (
NAME VARCHAR (250) NOT NULL, OID_ LONGBLOB, PRIMARY KEY(NAME) ); #
-----------------------------------------------------------------------
[torque-sql-exec] # OJB_DLIST #
-----------------------------------------------------------------------
[torque-sql-exec] drop table if exists OJB_DLIST; CREATE TABLE OJB_DLIST
( ID INTEGER NOT NULL, SIZE_ INTEGER, PRIMARY KEY(ID) ); #
-----------------------------------------------------------------------
[torque-sql-exec] # OJB_DLIST_ENTRIES #
-----------------------------------------------------------------------
[torque-sql-exec] drop table if exists OJB_DLIST_ENTRIES; CREATE TABLE
OJB_DLIST_ENTRIES ( ID INTEGER NOT NULL, DLIST_ID INTEGER NOT NULL,
POSITION_ INTEGER, OID_ LONGBLOB, PRIMARY KEY(ID) ); #
-----------------------------------------------------------------------
[torque-sql-exec] # OJB_DSET #
-----------------------------------------------------------------------
[torque-sql-exec] drop table if exists OJB_DSET; CREATE TABLE OJB_DSET (
ID INTEGER NOT NULL, SIZE_ INTEGER, PRIMARY KEY(ID) ); #
-----------------------------------------------------------------------
[torque-sql-exec] # OJB_DSET_ENTRIES #
-----------------------------------------------------------------------
[torque-sql-exec] drop table if exists OJB_DSET_ENTRIES; CREATE TABLE
OJB_DSET_ENTRIES ( ID INTEGER NOT NULL, DLIST_ID INTEGER NOT NULL,
POSITION_ INTEGER, OID_ LONGBLOB, PRIMARY KEY(ID) ); #
-----------------------------------------------------------------------
[torque-sql-exec] # OJB_DMAP #
-----------------------------------------------------------------------
[torque-sql-exec] drop table if exists OJB_DMAP; CREATE TABLE OJB_DMAP (
ID INTEGER NOT NULL, SIZE_ INTEGER, PRIMARY KEY(ID) ); #
-----------------------------------------------------------------------
[torque-sql-exec] # OJB_DMAP_ENTRIES #
-----------------------------------------------------------------------
[torque-sql-exec] drop table if exists OJB_DMAP_ENTRIES; CREATE TABLE
OJB_DMAP_ENTRIES ( ID INTEGER NOT NULL, DMAP_ID INTEGER NOT NULL,
KEY_OID LONGBLOB, VALUE_OID LONGBLOB, PRIMARY KEY(ID) );
[torque-sql-exec] java.sql.SQLException: Syntax error or access
violation,  message from server: "You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near '; CREATE TABLE OJB_HL_SEQ ( TABLENAME VARCHAR
(250) NOT NULL, MAX_KEY BIGINT, GR' at line 3"
[torque-sql-exec] 0 of 2 SQL statements executed successfully
BUILD SUCCESSFUL
Total time: 4 seconds


How do I fix this????

thx
Laurent

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

Reply via email to