[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6019) misleading exception when the entity it not mapped

odelya holiday (JIRA) noreply at atlassian.com
Wed Mar 16 05:45:09 EDT 2011


misleading exception when the entity it not mapped
--------------------------------------------------

                 Key: HHH-6019
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6019
             Project: Hibernate Core
          Issue Type: Bug
          Components: query-hql
    Affects Versions: 3.3.0.SP1
            Reporter: odelya holiday


When the entity in not mapped, and I write a code like this:

final Query query = session.createQuery(hql);
if (values != null && values.length > 0) {
for (int i = 0; i < values.length; i++) {
query.setParameter(i, values[i]/*, types[i]*/);
}
}

I get an exception java.lang.IndexOutOfBoundsException: Remember that ordinal parameters are 1-based!

While the real problem is that the entity was not mapped in hibernate.cfg.xml file!

Please fix the error message

-- 
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