[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3123) NullPointerException on invalid HQL query with an extra brace

Geoffrey De Smet (JIRA) noreply at atlassian.com
Thu Feb 21 05:47:33 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29556 ] 

Geoffrey De Smet commented on HHH-3123:
---------------------------------------

java.lang.NullPointerException
    at org.hibernate.hql.ast.ParameterTranslationsImpl.getNamedParameterExpectedType(ParameterTranslationsImpl.java:63)
    at org.hibernate.engine.query.HQLQueryPlan.buildParameterMetadata(HQLQueryPlan.java:296)
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:97)
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
    at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
    at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
    at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
    at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)


It gives the NPE probably because it can't parse the p.soort parameter.

> NullPointerException on invalid HQL query with an extra brace
> -------------------------------------------------------------
>
>                 Key: HHH-3123
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3123
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: query-hql
>    Affects Versions: 3.2.5
>            Reporter: Geoffrey De Smet
>            Priority: Trivial
>
> This query:
> "select p from IndividueleRekeningKasPO p left join fetch p.irTotalen inner join fetch p.toegangIndividueleRekeningKas tirkas where tirkas.authorityRef in (:authorityref)) and p.soort = :soort and p.id > 0"
> gives a NPE. The strange thing is that this query executes:
> "select p from IndividueleRekeningKasPO p left join fetch p.irTotalen inner join fetch p.toegangIndividueleRekeningKas tirkas where tirkas.authorityRef in (:authorityref)) and p.id > 0"
> both are invalid, because there is a closing brace to much in "(:authorityref))".

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