db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Clos <mail...@gmx.net>
Subject Re: maven's torque:insert-sql error 150
Date Wed, 05 Jan 2005 19:00:05 GMT
As you wrote the problem is simple that ojbxdoclet generates wrong 
schema-files.
I don´t know any automatism to bring the schema files in the right order 
and solve depedencies.


If there are only a few tables you can sort them manually in the 
schema-file or in the sql-insert script.
run first create-sql, sort them, run insert-sql.
But it´s an really bad way :(




Smith James E A1C 805 CSPTS/SCE schrieb:

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


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