aspose file tools*
The moose likes Object Relational Mapping and the fly likes Association references unmapped class exception with hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Association references unmapped class exception with hibernate" Watch "Association references unmapped class exception with hibernate" New topic
Author

Association references unmapped class exception with hibernate

Shyam Gautam
Greenhorn

Joined: Sep 07, 2011
Posts: 1
hii to all

actually i am a new to hybernate and during make projects i get this exception and after spending 2 more days i am not able to find why this exception is comes please suggest me .
because i knew this error is coming during the getseeion to the database to load the mapping file .

please check where is my mapping is wrong ?

exception is
org.hibernate.MappingException: Association references unmapped class: com.tra.Generate.TraCurrentUsers
at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2380)
at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2662)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
at com.tra.manager.transaction.TransactionMngr.getSession(TransactionMngr.java:627)
at com.tra.manager.transaction.TransactionMngr.retrieveData(TransactionMngr.java:246)

i make my .hbm.xml and pojo by reverse enginnering i want to map usermaintenance table to the tracurrentusers and traroles

first .hbm file is




second one is

last third one is
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Association references unmapped class exception with hibernate
 
Similar Threads
Hibernate Issue
Hibernate Association
Hibernate Association
how to insert a current date into the databse colunm using hybernate ?
ids for this class must be manually assigned before calling save()