-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Where is documenation for hbm2ddl.schemaexport?
PostPosted: Mon Aug 01, 2005 11:54 am 
Newbie

Joined: Tue Jul 19, 2005 11:21 am
Posts: 3
Location: Boulder CO USA
I'm having trouble with this tool and cannot find the documentation. I've looked at the faq and it only seems to dicuss hiberante. I've googled for schemaexport documenation with no luck either.

Where does it look for the hibernate.cfg.xml file? As a result of me changing eclipse's build path from puregamesinc to puregamesinc/src, the ant task can no longer find the hiberante.cfg.xml file.

Before I changed the build path, it (schemaexport) could not find the Person.hbm.xml file. Person.hbm.xml was definitly where I said it was in the hiberante.cfg.xml mapping statement. I can generate the Person.hbm.xml with the hibernatedoclet. I checked the permissions and did a chmod 777 Person.hbm.xml and this did not help.

Any suggestions?

Thanks,
Siegfried


Top
 Profile  
 
 Post subject: How many tools are there?
PostPosted: Mon Aug 01, 2005 1:54 pm 
Newbie

Joined: Tue Jul 19, 2005 11:21 am
Posts: 3
Location: Boulder CO USA
I found some sample source code that works in one directory but not another. The error is described above.

<target name="schemaexport" depends="dist">
<java classname="org.hibernate.tool.hbm2ddl.SchemaExport" classpathref="classpath.run">
<arg line="--config=hibernate.cfg.xml --output=${name}.sql"/>
</java>
</target>

I got this out of some book -- I cannot remember the name.

I was polking around in AppFuse and found this example. It worked to for that project. I'm having trouble setting up the class path for it my new project.

<target name="schemaexport" depends="dist">
<taskdef name="schemaexport"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask">
<classpath>
<path refid="classpath.run"/>
</classpath>
</taskdef>

<schemaexport quiet="no" text="no" drop="no" delimiter=";"
properties="database.properties" output="create-tables.sql">
<fileset dir="src" includes="**/*.hbm.xml"/>
</schemaexport>

</target>


What is the difference between these two? Are these two different tools? I have hibernate in my class path for the second one, but it does not work.


When I look at the source code I see these comments:
**
* An Ant task for <tt>SchemaExport</tt>.
*
* <pre>
* &lt;taskdef name="schemaexport"
* classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
* classpathref="class.path"/&gt;
*
* &lt;schemaexport
* properties="${build.classes.dir}/hibernate.properties"
* quiet="no"
* text="no"
* drop="no"
* delimiter=";"
* output="${build.dir}/schema-export.sql"&gt;
* &lt;fileset dir="${build.classes.dir}"&gt;
* &lt;include name="*.hbm.xml"/&gt;
* &lt;/fileset&gt;
* &lt;/schemaexport&gt;
* </pre>
*
* @see SchemaExport
* @author Rong C Ou
*

Hmmmmm.... When I use the command line, there is no oppertunity to specify the input file set. Could this be my problem? Do I need to specify the file set using this ant task from the comments?

Siegfried


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 9:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Hibernate 3.x
http://www.hibernate.org/hib_docs/tools/ant/index.html

Hibernate 2.x
http://www.hibernate.org/hib_docs/reference/en/html/toolsetguide.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.