-->
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: org.hibernate.QueryException: could not resolve property
PostPosted: Mon Oct 17, 2005 1:06 pm 
Newbie

Joined: Mon Sep 26, 2005 8:43 am
Posts: 16
I am in the process of Hibernate Migration from version 2.1.6 to 3.0.5. While starting the Application Server I face some problems:
Error Trace is as follows:

Code:
21:45:27,798 INFO  [SessionFactoryImpl] Checking 15 named queries
21:45:27,848 ERROR [SessionFactoryImpl] Error in named query: ABCReportDAOHibImpl.findReportColMetadataByReportGuid
org.hibernate.QueryException: could not resolve property: REPORT_GUID of: com.abc.persistence.ABCReportColMetadataDBVO [

         FROM com.abc.persistence.ABCReportColMetadataDBVO AS reportColDefn
         WHERE reportColDefn.REPORT_GUID = :reportId

]


Has this anything to do with the way the query is written in the hbm.xml file? Following is the query written in the problematic hbm.xml file.

Code:
<query name="ABCReportDAOHibImpl.findReportColMetadataByReportGuid">
    <![CDATA[
         FROM com.abc.persistence.ABCReportColMetadataDBVO AS reportColDefn
         WHERE reportColDefn.REPORT_GUID = :reportId
    ]]>
</query>


Based on following (written in the Hibernate 3 Migration Guide) I changed the query parser to the old 2.1 query parser(org.hibernate.hql.classic.ClassicQueryTranslatorFactory). Then also it produces the same result.

Quote:
Hibernate3 comes with a brand-new, ANTLR-based HQL/SQL query translator. However, the Hibernate 2.1 query parser is still available. The query parser may be selected by setting the Hibernate property hibernate.query.factory_class. The possible values are org.hibernate.hql.ast.ASTQueryTranslatorFactory, for the new query parser, and org.hibernate.hql.classic.ClassicQueryTranslatorFactory, for the old parser. We are working hard to make the new query parser support all queries allowed by Hibernate 2.1. However, we expect that many existing applications will need to use the Hibernate 2.1 parser during the migration phase.

_________________
--Beejal


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 17, 2005 1:44 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
so does ABCReportColMetadataDBVO have a property named REPORT_GUID?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 17, 2005 2:03 pm 
Newbie

Joined: Mon Sep 26, 2005 8:43 am
Posts: 16
Checking for what you asked really helped solve my problem. Thanks Steve :)

_________________
--Beejal


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.