db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Smith James E A1C 805 CSPTS/SCE" <James.Smit...@scott.af.mil>
Subject maven's torque:insert-sql error 150
Date Wed, 05 Jan 2005 16:13:21 GMT
When I try to rebuild my database from my generated sql files I receive
this error on tables that contain foreign keys in tables after it.

 

torque:insert-sql:

    [torque-sql-exec] Executing file: D:\...\target\sql\...-schema.sql

    [torque-sql-exec] [ERROR] Failed to execute: CREATE TABLE
COMMENT....

    [torque-sql-exec] [ERROR] java.sql.SQLException: General error,
message from server: "Can't create table '.\...\comment.frm' (errno:
150)"

.....

    [torque-sql-exec] [ERROR] Failed to execute: CREATE TABLE USER....

    [torque-sql-exec] [ERROR] java.sql.SQLException: General error,
message from server: "Can't create table '.\...\user.frm' (errno: 150)"

.....

 

The problem is, COMMENT has a foreign key in USER.  So this is an
ordering problem in the generated sql file, which is generated from the
torque schema file.  I don't generate the torque schema manually though,
so I don't have a chance to put it in order.  The torque schema is
generated by ojbxdoclet and is put in alphabetical order (since that is
the order it parses the java files).  Is there anything I can do to
avoid this problem?  I doubt I'm the first person to run into this.

 

James E Smith

805 CSPTS / SCBE

256 - 4336

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message