I have the named query below that I wanted to move from a class constant into a named query. I know the query works fine as a constant, but when I move it into a named query, it throws:
Initialization of bean failed; nested exception is net.sf.hibernate.MappingException: Error reading resource: com/mitchell/services/technical/claim/dao/vo/ClmDiary.hbm.xml
I have other queries I have successfully migrated. The only difference I see from the others is that this one has parens and single quotes, but that shouldn't make a diff. in a CDATA should it?
Thanks,
Lou
Code:
<query name="findClaim">
<![CDATA[from Claim as c inner join fetch c.diarySet d where d.claim = :claimId and d.claimExposure is null and ((d.accessibility = 'yyy') or (d.coCd = :companyCode1 and d.accessibility = 'xxx') or (d.coCd = :companyCode2 and d.accessibility = 'xxxzzz') or (d.coCd = :companyCode3 and d.epdOrgUserId = :epdOrgUserId))]]>
</query>
Hibernate version: 2.1.6
Mapping documents:Code between sessionFactory.openSession() and session.close():Full stack trace of any exception that occurs:Name and version of the database you are using:The generated SQL (show_sql=true):Debug level Hibernate log excerpt:[/code]