-->
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.  [ 4 posts ] 
Author Message
 Post subject: help needed- "no persistent classes found for query cla
PostPosted: Thu Dec 11, 2003 12:32 am 
Newbie

Joined: Tue Dec 09, 2003 8:04 am
Posts: 5
Hello All ,

i generated the hbm files by using hib-middlegen, used the hbm2java to generate the java source files.

wrote a java class to exercise hibernate using the hbm and the generated java files . However i keep getting this error :

no persistent classes found for query class: from com.digitalthink.lms.fp.core.entity.hibernate.LmsCourse as o where o.COURSEID='100000'


can anyone help me out ?

thanks ,

manu


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 11, 2003 1:48 am 
Newbie

Joined: Tue Oct 21, 2003 3:00 am
Posts: 11
Looks like you haven't got the data you are looking for in the database.

Lookint the table LmsCourse in your database. Then check if you have
a row with COURSEID='100000'.

Cheers,
KC


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 11, 2003 3:14 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Hibernate could not find a mapping for:

com.digitalthink.lms.fp.core.entity.hibernate.LmsCourse

or for any subclass of this class.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 11, 2003 4:07 am 
Newbie

Joined: Tue Dec 09, 2003 8:04 am
Posts: 5
Hello Gavin / KC ,

thanks for your replies.

the sequence of statements in my code was [ an overlook :-(( , its my first hibernate try out :-) ] :

factory = cfg.buildSessionFactory();

cfg.addClass( com.digitalthink.lms.fp.core.entity.hibernate.LmsCourse.class );

cfg.addClass( com.digitalthink.lms.fp.core.entity.hibernate.LmsSubdomain.class );

i moved the factory creation statement to the end and it worked.

so hibernate was unable to find the mapping which was causing this problem.

thanks,
manu


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