org.hibernate.hql.ast.QuerySyntaxError: unexpected token: ( near line 1, column 97 [select sum(t.clicks), date(t.date) from hdc.Tracker t where t.listing.merchant = ? group by date(t.date) order by sum(t.clicks)]

Hibernate JIRA | Jarod | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hibernate 3 rc1 breaks grouping by functions. It complains about finding an open paren after the 'group by'. http://forum.hibernate.org/viewtopic.php?t=939313 org.hibernate.hql.ast.QuerySyntaxError: unexpected token: ( near line 1, column 97 [select sum(t.clicks), date(t.date) from hdc.Tracker t where t.listing.merchant = ? group by date(t.date) order by sum(t.clicks)] at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:74) at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:214) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83) at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:414) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:814) at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:850) at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:41) at hdc.Test1.doTest5(Test1.java:241) at hdc.Test1.main(Test1.java:317) Caused by: line 1:97: unexpected token: ( at org.hibernate.hql.antlr.HqlBaseParser.groupByClause(HqlBaseParser.java:896) at org.hibernate.hql.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:704) at org.hibernate.hql.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:227) at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:150) at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:208) ... 8 more

    Hibernate JIRA | 1 decade ago | Jarod
    org.hibernate.hql.ast.QuerySyntaxError: unexpected token: ( near line 1, column 97 [select sum(t.clicks), date(t.date) from hdc.Tracker t where t.listing.merchant = ? group by date(t.date) order by sum(t.clicks)]
  2. 0

    Hibernate 3 rc1 breaks grouping by functions. It complains about finding an open paren after the 'group by'. http://forum.hibernate.org/viewtopic.php?t=939313 org.hibernate.hql.ast.QuerySyntaxError: unexpected token: ( near line 1, column 97 [select sum(t.clicks), date(t.date) from hdc.Tracker t where t.listing.merchant = ? group by date(t.date) order by sum(t.clicks)] at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:74) at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:214) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83) at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:414) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:814) at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:850) at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:41) at hdc.Test1.doTest5(Test1.java:241) at hdc.Test1.main(Test1.java:317) Caused by: line 1:97: unexpected token: ( at org.hibernate.hql.antlr.HqlBaseParser.groupByClause(HqlBaseParser.java:896) at org.hibernate.hql.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:704) at org.hibernate.hql.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:227) at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:150) at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:208) ... 8 more

    Hibernate JIRA | 1 decade ago | Jarod
    org.hibernate.hql.ast.QuerySyntaxError: unexpected token: ( near line 1, column 97 [select sum(t.clicks), date(t.date) from hdc.Tracker t where t.listing.merchant = ? group by date(t.date) order by sum(t.clicks)]
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Using Left Joins in HQL on 3 Tables

    Stack Overflow | 5 years ago | Asuthosh Sharma
    org.hibernate.hql.ast.QuerySyntaxError: unexpected token: LEFT near line 1, column 23 [FROM com.admin.A as a LEFT JOIN B as b where a.Id=b.Id LEFT JOIN C as c where b.type=c.type]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.hql.ast.QuerySyntaxError

      unexpected token: ( near line 1, column 97 [select sum(t.clicks), date(t.date) from hdc.Tracker t where t.listing.merchant = ? group by date(t.date) order by sum(t.clicks)]

      at org.hibernate.hql.ast.ErrorCounter.throwQueryException()
    2. Hibernate HQL/JP-QL Parser
      QueryTranslatorImpl.compile
      1. org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:74)
      2. org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:214)
      3. org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
      4. org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
      4 frames
    3. Hibernate
      QueryImpl.iterate
      1. org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:414)
      2. org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:814)
      3. org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:850)
      4. org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:41)
      4 frames
    4. hdc
      Test1.main
      1. hdc.Test1.doTest5(Test1.java:241)
      2. hdc.Test1.main(Test1.java:317)
      2 frames