You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by go...@almirena.com on 2003/01/03 11:16:57 UTC

SQL ERRORS - query

Hi All,

I am trying to get the bookstore example working. I have created the
bookstore.xml in the schema/ directory, and I have run ant -f
build-torque.xml succesfully. Files now exist where they should .


But when I run 'ant -f build-torque.xml create-db' I get two sql ERRORS,
that point back to a problem with the create-db.sql script created by
Torque:

$ cat create-bb.sql
drop database bookstore;
create database bookstore;
drop database default;		<--- Where does this come from?
create database default;	<---  "     "	"    "	  "

Now I don't understand where the "default" database comes from.
Should it be there or have I not done something right in the properties
files?

I am not sure what's wrong.

Regards
Goffredo.


ERRORS listed below
------------------------------------------------------------
$ ant -f build-torque.xml create-db
Buildfile: build-torque.xml

create-db-check:
create-db:
[torque-data-model] Generating to file /home/fred/tmp2/torque-3.0/src/sql/creat
[torque-data-model] Resolver: used database.dtd from org.apache.torque.engine.d
[torque-data-model] Resolver: used database.dtd from org.apache.torque.engine.d
     [echo]
     [echo]	  Executing the create-db.sql script ...
     [echo]
     [echo] driver=org.postgresql.Driver
     [echo] password=
     [echo] userid=fred
     [echo] url=jdbc:postgresql://127.0.0.1:5432/mydb_junk
      [sql] Executing file: /home/fred/tmp2/torque-3.0/src/sql/create-db.sql
      [sql] Failed to execute: drop database default
      [sql] java.sql.SQLException: ERROR:  parser: parse error at or near 
              "default"
      [sql] Failed to execute: create database default
      [sql] java.sql.SQLException: ERROR:  parser: parse error at or near 
              "default"
      [sql] 2 of 4 SQL statements executed successfully

BUILD SUCCESSFUL