[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2460) Multiple object creates on HQL select causes "unexpected token: ,"

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Mar 1 21:39:31 EST 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2460?page=all ]
     
Steve Ebersole closed HHH-2460:
-------------------------------

    Resolution: Rejected

> Multiple object creates on HQL select causes "unexpected token: ,"
> ------------------------------------------------------------------
>
>          Key: HHH-2460
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2460
>      Project: Hibernate3
>         Type: Bug

>   Components: query-hql
>     Versions: 3.1.2
>  Environment: MySQL
>     Reporter: Steve Mayhew

>
>
> When executing this query:
>     select new java.lang.String('test1'), new java.lang.String('test2')
>     from SomeMappedClass
> You get a syntax error.  It does not matter what is in the from clause, result is always the same.
> [2007-03-01 16:51:29,349] [ERROR:org.hibernate.hql.PARSER] [] - line 1:37: unexpected token: ,
> [2007-03-01 16:51:29,365] [DEBUG:org.hibernate.hql.ast.AST] [] - --- HQL AST ---
>  \-[QUERY] 'query'
> org.hibernate.hql.ast.QuerySyntaxException: unexpected token: , near line 1, column 37 [select new java.lang.String('test1'), new java.lang.String('test2')
> from SomeMappedClass
> 	at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
> 	at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:244)
> 	at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155)
> 	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 net.jvnet.dev.hqe.ThreadHQLQueryExecution.run(Unknown Source)
> Caused by: line 1:37: unexpected token: ,
> 	at org.hibernate.hql.antlr.HqlBaseParser.selectFrom(HqlBaseParser.java:1145)
> 	at org.hibernate.hql.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:702)
> 	at org.hibernate.hql.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:296)
> 	at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:159)
> 	at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:238)
> 	... 9 more

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