Hibernate Books

All times are UTC - 5 hours [ DST ]

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: RunSchemaExport does nothing
PostPosted: Sun Mar 04, 2007 5:49 pm 

Joined: Sun Mar 04, 2007 2:00 pm
Posts: 1

I'm trying to generate a ddl with the Hibernate tools plugin from within Eclipse by right clicking on a hibernate configuration and then choosing "Run Schema Export". Yet nothing happens afterwards; no errors, no warnings. Has anyone used this feature? My Hibernate config and mapping files should be okay because I can use other features of the tools (generate POJO, etc.) and I actually did manage to create the DB by by using the autoddl feature in the cfg file but I can't use it interactively.

I am using the following components:
Eclipse 3.2 (WTP 1.5)
Hibernate 3.2
Hibernate Tools Plugin 3.2 beta 9
MySQL 5.0
Tutorial example supplied with Hibernate 3.2

Thanks in advance.

 Post subject:
PostPosted: Mon Mar 05, 2007 3:52 am 

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
Did you try generating the sql doing using the Hbm2Ddl code directly to identify the problem?

Something like:
public static void createDDLScript()
   SchemaExport schemaExport = new SchemaExport(getConfiguration()).setHaltOnError(true);
   schemaExport.setOutputFile(OUTPUT_FILE).create(true, false);

To create a configuration object, just point to the hibernate.cfg.xml file.

PS : please don't forget to give credits below if you found this answer useful :)

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.