-->
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: Problems with HQL query...
PostPosted: Tue Oct 21, 2003 12:13 pm 
Newbie

Joined: Tue Oct 21, 2003 12:06 pm
Posts: 12
I'm working with my first class/mapping with Hibernate. I've got the mapping built and know that it works as I'm able to persist objects to the database (I verrified the persistence via a database browser).

The problem is with queries. I'm trying to execute the most simple query:

from Mailbox

and I get the following output from my test case:

2003-10-21 12:01:20,204 WARN [net.sf.hibernate.hql.QueryTranslator] no persistent classes found for query class: from Mailbox

Here's the row from the Mailbox table in the database browser:

100, 1000, 1001, 20031020, 092500, 0x4953412a30302a202020202020202020202a30302a202020202020202020202a5a5a2a5050474f4d50524f442020202020202a30322a54494d4320202020202020202020202a3033303631322a303630342a552a30303230302a3030333539363030312a312a502a3e7e47532a534d2a5050474f4d50524f442a54494d432a32303033303631322a303630342a333539363030312a582a3030343031307e53542a3230342a3335393630303130317e42322a2a54494d432a3030303030302a30303230303039313831352a4c2a50502a427e4232412a30307e4c31312a4348454d383734373338322a52457e4c31312a383734373338322a4d427e4e54452a4f54482a48434c33377e4e312a53482a50504720496e64757374726965732050726f64756374696f6e2a5a5a2a31303533307e4e332a36383020506974747362757267682044726976657e4e342a44656c61776172652a4f482a34333031352a55537e4e372a2a303030303030303030302a37363233302a477e53352a312a434c2a2a2a2a2a2a2a2a3030303030307e4c31312a3030323030303931383135303030312a53497e4c31312a393339363339205223362a504f7e4736322a36392a32303033303631372a492a303030307e4736322a36392a32303033303631382a4b2a303735397e4e54452a4f54482a434f4e5349474e45457e4e312a53462a5050472043414e4144412c494e432a5a5a2a5050473033377e4e332a4348454d4943414c20504c414e542c2043414e414c20524420525445203133327e4e342a424541554841524e4f49532a51432a4a364e3142332a43417e4736312a53482a556e6b6e6f776e20556e6b6e6f776e2a54452a353134343239303030307e4f49442a48434c33372a2a2a4c422a36303030307e53352a322a43552a2a2a2a2a2a2a2a3030303030307e4c31312a3030323030303931383135303030322a53497e4c31312a393339363339205223362a504f7e4736322a37302a32303033303631382a472a303830307e4736322a37302a32303033303631382a4c2a303830307e4e312a434e2a454b41204348494d49452043414e41444120494e432a5a5a2a43484d313235387e4e332a313930302053542050415452494345204553547e4e342a4d41474f472a51432a4a31583458362a43417e4f49442a48434c33372a2a2a4c422a36303030307e4c332a36303030302a472a2a2a2a2a2a2a302a452a2a4c7e53452a33322a3335393630303130317e47452a312a333539363030317e4945412a312a3030333539363030317e7e, EDI, 204, null, null, IR

What am I doing wrong here?

Thanks in advance,
Chuck


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 21, 2003 12:50 pm 
Newbie

Joined: Tue Oct 21, 2003 12:06 pm
Posts: 12
Forgot to mention that my Mailbox class is just a plain ole JDO class with setters/getters for all the attributes as in the Cat class in the Hibernate quickstart guide.

Thanks again,
Chuck


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 21, 2003 2:06 pm 
Newbie

Joined: Mon Oct 20, 2003 3:03 pm
Posts: 13
From what you have given, I can't telll what the problem is. Perhaps a simple easy to get up and running example woule help (mapping file, test class, bean, DDL to create table and SQL to insert record). Short of that:

Are you using the same SessionFactory where persisting the class worked? the one that has the Mailbox class associated with it?

How about an altenate syntax (just for kicks). e.g:
sess.find("from m in class com.foo.beans.Mailbox")?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 21, 2003 3:01 pm 
Newbie

Joined: Tue Oct 21, 2003 12:06 pm
Posts: 12
kbrown,

Thanks for pointing out the obvious!

The save was using one configuration file and the query was using another!

Everything is now working as advertised!

Ta!
Chuck


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.