-->
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.  [ 2 posts ] 
Author Message
 Post subject: Default Hib. Reverse Engineering results won't run?
PostPosted: Fri Mar 02, 2007 5:59 am 
Newbie

Joined: Fri Jan 05, 2007 9:15 am
Posts: 5
Hey there,

I was using HRE to access a Oracle DB. There where several tables I selected for reverse engineering. I've done this with the "Eclipse Hibernate Tools". The creation of the table.java and the tableHome.java (the DAOs) was successfull. (I've just had to set the right package name, everything else was done correct.)

Now I've tried to run the app. As the sessionFactory should be created several errors occured. The reason for this errors where dependencies between the tables. When table1.hbm.xml was proceeded, a reference to table2 was found and vice versa.


Code:
Exception in thread "main" org.hibernate.MappingException: Association references unmapped class: TFtyp
   at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2036)
   at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2497)
   at org.hibernate.cfg.HbmBinder$SecondPass.doSecondPass(HbmBinder.java:2468)
   at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:884)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:999)


I could resolve the problem by coping all hbm.xml-files into one file. But i think this is not a good solution.

My question is: How do i declare a typ forward? And why is HRE generated code not completely runable right after the generation of the classes?


Hibernate version:
3
native language:
german


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 02, 2007 11:40 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
If that table doesn't reference any other unmapped classes, you probably haven't included both the hbm.xml files in your configuration.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


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