Hibernate version: 3.0
I make 2 queries as below in log_info.hbm.xml. When I run it, the following exception thrown with the 2nd query. The first qury is correct, and 2rd has problem with "?1". When I move "?1" to a specific value (12), it has no problem.
Who can help me?
Thanks
gzhuye
Query in log_info.hbm.xml:
Code:
<query name="com.atlantics.atm.db.bean.Log_info.getAllLogInfo"><![CDATA[
from com.atlantics.atm.db.bean.Log_info
]]></query>
<query name="com.atlantics.atm.db.bean.Log_info.getSearchLogInfo"><![CDATA[
from com.atlantics.atm.db.bean.Log_info as tbl where tbl.log_info_id = ?1
]]></query>
Exception:
Code:
org.hibernate.HibernateException: Errors in named queries: com.atlantics.atm.db.bean.Log_info.getSearchLogInfo
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:302)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:769)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:695)
[/code]