-->
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: "no persistent classes found for query class": wha
PostPosted: Thu Oct 02, 2003 4:17 pm 
Newbie

Joined: Wed Oct 01, 2003 7:59 am
Posts: 2
Hello:

When I run my Hibernate application and try do a query I get this message:
Code:
WARNING: no persistent classes found for query class: from bomi.bean.TbNfEsp where idcodigo=1

What does it mean? Is this indicate a incorrect mapping? When I start my application, there is this message:
Quote:
INFO: Mapping class: bomi.bean.TbCadcli -> tb_cadcli

This is the only message about mapping class. Well, I have 10 tables to mapping. Is it mean that only tb_cadcli is being mapping and others not? Any idea?

Thanks,

_________________
Rafael Ubiratam Clemente Afonso
rafael.afonso@javafree.com.br
JavaFree.com.br
Se


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 02, 2003 6:11 pm 
Beginner
Beginner

Joined: Fri Sep 05, 2003 10:17 am
Posts: 42
this error typically means you have not configured your class. You should have something like:
Code:
Class[] classes = new Class[]  {
                        my.package.MyClass.class,
                        my.package.MyClass2.class
                                           };
                          
for( int i = 0; i < classes.length; i++ )
{
   try
   {
      cfg.addClass( classes[ i ] );
   }
   catch( MappingException me )
  {
      // do something   
   }
}

although hibernate is smart enough to read the mapping documents when it starts it requires the Configuration object to have the classes added. Look at some of the examples on how to add classes.

hope this helps.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 02, 2003 6:13 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
bomi.bean.TbNfEsp is not the same class as bomi.bean.TbCadcli meaning based on your message the query should be from bomi.bean.TbCadcli t where t.idcodigo=1


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.