[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-1609) EJBQL null pointer exception in parsing bad EJBQL does not help troubleshoot syntax errors
Diego Pires Plentz (JIRA)
noreply at atlassian.com
Mon Sep 10 23:37:14 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Diego Pires Plentz resolved HHH-1609.
-------------------------------------
Assignee: Diego Pires Plentz
Resolution: Fixed
Fix Version/s: 3.2.0.cr3
> EJBQL null pointer exception in parsing bad EJBQL does not help troubleshoot syntax errors
> ------------------------------------------------------------------------------------------
>
> Key: HHH-1609
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1609
> Project: Hibernate3
> Issue Type: Improvement
> Components: query-hql
> Affects Versions: 3.1.1
> Reporter: Andrew Robinson
> Assignee: Diego Pires Plentz
> Priority: Minor
> Fix For: 3.2.0.cr3
>
>
> The following EJBQL (which is lacking the alias 'u' for the User object) produces a null pointer exception:
> select u from User where u.username = :username
> Exception:
> Caused by: java.lang.NullPointerException
> at org.hibernate.hql.ast.tree.IdentNode.resolveAsNakedComponentPropertyRefLHS(IdentNode.java:195)
> at org.hibernate.hql.ast.tree.IdentNode.resolve(IdentNode.java:85)
> at org.hibernate.hql.ast.tree.DotNode.resolveFirstChild(DotNode.java:139)
> at org.hibernate.hql.ast.HqlSqlWalker.lookupProperty(HqlSqlWalker.java:397)
> at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:4316)
> at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1211)
> at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4032)
> at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3518)
> at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1758)
> at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776)
> at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:577)
> at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
> at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
> at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:218)
> at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:158)
> at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109)
> at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:75)
> 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)
> at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1602)
> at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:54)
> This type of syntax error handling make troubleshooting the problem extremely difficult
--
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