[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1404) ordinal parameter mismatch

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Mar 21 13:00:41 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-1404.
-------------------------------


Closing stale resolved issues

> ordinal parameter mismatch
> --------------------------
>
>                 Key: HHH-1404
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1404
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: query-hql
>    Affects Versions: 3.1.1
>         Environment: Windows XP SP2, JDK 1.5.0_06-b05, Spring 1.2.6, antlr-2.7.6rc1
>            Reporter: Artur Wronski
>            Priority: Critical
>         Attachments: RecognizerBug.java
>
>
> After migration from Hibernate 3.0.5 to Hibernate 3.1.1. this query fails:
>         StringBuilder q = new StringBuilder("from domain.Order o ")
>         	.append("where o.status in (?, ?) and o.paid = ? and o.stockAgreed = ? and ")
>         	.append("o.reminderDate is not null and o.orderRecallDate < ? ");
>         
>         return getSession()
>         	.createQuery(q.toString())
>         	.setInteger(0, 1)
>         	.setInteger(1, 2)
>         	.setBoolean(2, false)
>         	.setBoolean(3, true)
>         	.setTimestamp(4, new Date())
>         	.list();
> with exception:
> org.hibernate.HibernateException: ordinal parameter mismatch
> 	at org.hibernate.engine.query.HQLQueryPlan.buildParameterMetadata(HQLQueryPlan.java:225)
> 	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:95)
> 	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54)
> 	at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
> 	at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:134)
> 	at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:113)
> Thanks for help,
> Arthur

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list