-->
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.  [ 6 posts ] 
Author Message
 Post subject: Database Schema Generation using Hibernate Tool in Eclipse
PostPosted: Wed Nov 04, 2009 1:02 pm 
Newbie

Joined: Wed Nov 04, 2009 12:48 pm
Posts: 5
Hi guys,

I am exporting a Database Schema using the Hibernate Tool in the Eclipse plugin using Ant Task.
I am getting an exception while generating the Database schema by building Ant Task as :

before this ALL HBM mapping files are successfully executed
Build Failed:
Schema text failed: An association from the table MyTable1 refers to an unmapped class: Search


Here in this application I am having nearly more than 100 tables with associations. So I am trying to generate Database schema using the POJOs and Mapping files.

While building the project with Ant Task I am getting the above error.
And also it has successfully executed all the HBM mapping files after that only we are getting this error.

Can anyone plz try to help me out from this.

Thanks in Advance.............!
regards,
Manohar


Top
 Profile  
 
 Post subject: Re: Database Schema Generation using Hibernate Tool in Eclipse
PostPosted: Thu Nov 05, 2009 3:24 am 
Newbie

Joined: Wed Nov 04, 2009 12:48 pm
Posts: 5
Here is my Ant task which I have written in build.xml file

<target name="schemaexport">
<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="project.class.path"/>
<schemaexport
properties="src/hibernate.properties"
delimiter=";"
create="yes"
output="schema-export123.sql">
<fileset dir="src">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaexport>
</target>

Hibernate Tool version is 3.4

Please anyone help me out

Thanks in Advance
Manohar


Top
 Profile  
 
 Post subject: Re: Database Schema Generation using Hibernate Tool in Eclipse
PostPosted: Thu Nov 05, 2009 12:18 pm 
Newbie

Joined: Wed Nov 04, 2009 12:48 pm
Posts: 5
No , schema-export123.sql is not generated..because I got that expection as posted above..

Actually , all the HBM mapping files are executed perfectly, after that it is going through the Pojo classes (or) HBM files.

Plz try to help me out, as I am stuck in this..

Thanks in Advance..

Manohar


Top
 Profile  
 
 Post subject: Re: Database Schema Generation using Hibernate Tool in Eclipse
PostPosted: Fri Nov 06, 2009 7:22 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Give me the hbm.xml mapping of Search classa and the mapping snippets of the classes which references to the Search.class.


Top
 Profile  
 
 Post subject: Re: Database Schema Generation using Hibernate Tool in Eclipse
PostPosted: Fri Nov 06, 2009 8:48 am 
Newbie

Joined: Wed Nov 04, 2009 12:48 pm
Posts: 5
Hi thanks for the reply,

we are using the hibernate.properties file also in that we are keeping the database name and username and password,etc.
And every HBM mapping files are also mapped in the hibernate.cfg file correctly.

yeah I have added the plugins in the Eclipse for the Hibernate Tool 3.4
So I can find the option of Hibernate in Eclipse with including "hibernate.reveng.xml" in it also...


Top
 Profile  
 
 Post subject: Re: Database Schema Generation using Hibernate Tool in Eclipse
PostPosted: Fri Nov 06, 2009 9:01 am 
Newbie

Joined: Wed Nov 04, 2009 12:48 pm
Posts: 5
actually they are so many join-subclass tags in the search.hbm.xml file...


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