-->
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
PostPosted: Tue Jan 31, 2006 2:08 am 
Newbie

Joined: Thu Jan 19, 2006 2:03 am
Posts: 3
Hi,

I executed the following statement within a Hibernate session,

List result = session.createQuery("from org.dais.efm.vo.common.BusinessEntity").list();

And, received the following error........

1344 [main] WARN hql.QuerySplitter - no persistent classes found for query class: from org.dais.efm.vo.common.BusinessEntity
I have checked the appropriate persistent class to see if I have missed out anything. All are well.

I am not sure what else I need to do.

Thanks in advance for assisting.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 4:10 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
Hi,

can you show us the mapping and your hibernate.cfg.xml ?
So far I can think of these possible reasons:

1. The class org.dais.efm.vo.common.BusinessEntity is not mapped

2. The mapping is not loaded

3. The class is not in your classpath

Just guessing.

_________________
dont forget to rate !


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 6:16 pm 
Newbie

Joined: Thu Jan 19, 2006 2:03 am
Posts: 3
Hi,

This is my efmhibernate.cfg.xml mapping content,
<mapping resource="org/dais/efm/vo/common/BusinessEntity.hbm.xml" />
<mapping resource="org/dais/efm/vo/common/BusinessRelationship.hbm.xml" />
<mapping resource="org/dais/efm/vo/common/BusinessRole.hbm.xml" />


Below is the content in BusinessEntity.hbm.xml,
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1

http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->

<class
name="org.dais.efm.vo.common.BusinessEntity"
table="BUSINESS_ENTITIES"
>

<id
name="businessEntityCode"
type="java.lang.String"
column="BUSINESS_ENTITY_CODE"
>
<generator class="assigned" />
</id>

<property
name="organisationTypeCode"
type="java.lang.String"
column="ORGANISATION_TYPE_CODE"
not-null="true"
length="10"
/>
<property
name="homePage"
type="java.lang.String"
column="HOME_PAGE"
not-null="true"
length="250"
/>
<property
name="createdBy"
type="java.lang.String"
column="CREATED_BY"
not-null="true"
length="30"
/>
<property
name="createdDate"
type="java.sql.Date"
column="CREATED_DATE"
not-null="true"
length="7"
/>
<property
name="modifiedBy"
type="java.lang.String"
column="MODIFIED_BY"
not-null="true"
length="30"
/>
<property
name="modifiedDate"
type="java.sql.Date"
column="MODIFIED_DATE"
not-null="true"
length="7"
/>
<property
name="implicitFlag"
type="java.lang.String"
column="IMPLICIT_FLAG"
not-null="true"
length="1"
/>

<!-- Associations -->

<!-- bi-directional one-to-many association to PrimaryBusinessService -->
<set
name="primaryBusinessServices"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="BUSINESS_ENTITY_CODE" />
</key>
<one-to-many
class="org.dais.efm.vo.common.PrimaryBusinessService"
/>
</set>

</class>
</hibernate-mapping>

Thanks in advance for your assistance.


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.