db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Hill <RH...@classmates.com>
Subject RE: create-db.sql: @DATABASE_DEFAULT@
Date Wed, 15 Oct 2003 01:46:39 GMT
It looks like @DATABASE_DEFAULT@ is the schema/id-table-schema.xml, which is
used by the id broker mechanism. My schema/pitchers-schema.xml uses "native"
as the defaultIdMethod. Does it still need to use the id broker and create
the @DATABASE_DEFAULT@ database? If so, shouldn't the create-db target do
that for you?

-----Original Message-----
From: Richard Hill [mailto:RHill@classmates.com]
Sent: Tuesday, October 14, 2003 6:29 PM
To: 'torque-user@db.apache.org'
Subject: create-db.sql: @DATABASE_DEFAULT@


I'm using torque3.0.2 and running the command "ant -f build-torque.xml
create-db", which generates the contents of the src/sql/create-db.sql file.
This file contains:

drop database if exists PITCHERS;
create database PITCHERS;
drop database if exists @DATABASE_DEFAULT@;
create database @DATABASE_DEFAULT@;

Why does it try to create the database @DATABASE_DEFAULT@? Is it needed?


---------------------------------------------------------------------------
  Full build output:
---------------------------------------------------------------------------
C:\myDev\torque3.0.2_pitcher_example>ant -f build-torque.xml create-db
Buildfile: build-torque.xml

create-db-check:

create-db:
[torque-data-model] Generating to file
C:\myDev\torque3.0.2_pitcher_example\src\sql\create-db.sql
[torque-data-model] Parsing file: 'id-table-schema.xml'
[torque-data-model] log4j:WARN No appenders could be found for logger
(org.apache.torque.engine.database.transform.
DTDResolver).
[torque-data-model] log4j:WARN Please initialize the log4j system properly.
[torque-data-model] Parsing file: 'pitchers-schema.xml'
     [echo]
     [echo]       Executing the create-db.sql script ...
     [echo]
      [sql] Executing file:
C:\myDev\torque3.0.2_pitcher_example\src\sql\create-db.sql
      [sql] Failed to execute: drop database if exists @DATABASE_DEFAULT@
      [sql] java.sql.SQLException: Syntax error or access violation: You
have an error in your SQL syntax near '@DA
TABASE_DEFAULT@' at line 1
      [sql] Failed to execute: create database @DATABASE_DEFAULT@
      [sql] java.sql.SQLException: Syntax error or access violation: You
have an error in your SQL syntax near '@DA
TABASE_DEFAULT@' at line 1
      [sql] 2 of 4 SQL statements executed successfully

BUILD SUCCESSFUL
Total time: 17 seconds
C:\myDev\torque3.0.2_pitcher_example>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

---------------------------------------------------------------------
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