• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generation & execution DDL schema  RSS feed

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone! need help in the next issue:

there are 2 annotated classes :


I'm trying to generate a ddl schema using org.hibernate.tool.hbm2ddl.SchemaExport class, example :

first all turns fine - by maven I compile classes, then run through exec-maven-plugin main method SchemaGenerator and getting folowing schema:

As you can see at first is a record "alter table TRACK drop constraint FK4C5F92B15F7E587;" naturally when i trying to run this scheme by sql-maven-plugin occurs following:

1) when i execute only one goal such " mvn sql:execute " i'm getting :
---sql-maven-plugin:1.5:execute <default-cli> @ test3-proj --- 0 of 0 SQL statements executed successfully

No errors, but nothing happens and schema don't create tables

2)when join this goal to all build and execute " mvn package "

[ERROR] Failed to execute goal org.codehaus.mojo:sql-maven-plugin:1.5:execute (c
reate-database) on project test3-proj: user lacks privilege or object not found:
FK4C5F92B15F7E587 -> [Help 1]

If i delete first record in created schema alter table TRACK drop constraint FK4C5F92B15F7E587; with option 2) all works out fine!

So, are there any solutions on this? why SchemaGenerator class generates this unnecessary record ? how to get rid of it ?

thanks in advance

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!