[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3213) Error while translating hql with ast translator

Severyn Vital (JIRA) noreply at atlassian.com
Wed Apr 2 07:56:33 EDT 2008


Error while translating hql with ast translator
-----------------------------------------------

                 Key: HHH-3213
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3213
             Project: Hibernate3
          Issue Type: Bug
          Components: query-hql
    Affects Versions: 3.2.4.sp1
            Reporter: Severyn Vital


AST translator mixed up my business logic bean package name with one of it's reserved words: 'by'. Classic translator works fine with this hql.

org.hibernate.hql.ast.QuerySyntaxException: unexpected token: by near line 1, column 123 [from by.subpackage.subpackage.bean.Project upperP where upperP in (select p from by.subpackage.subpackage.bean.Project p, by.subpackage.subpackage.bean.ContractorService cs where p.service=cs.serviceId and p not in (select pc.projectId from by.subpackage.subpackage.bean.ProjectContractor pc where pc.contractor=cs.contractor) and p.projectStatus=1 and cs.contractor=? and p.address.zipCode in (?,?,?,?))]
	at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31)
	at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24)
	at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
	at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:258)
	at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157)
	at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
	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)

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