I have this Java code (JPA):
String queryString = "SELECT b , sum(v.votedPoints) as votedPoint " +
" FROM Bookmarks b " +
" LEFT OUTER JOIN Votes v " +
" on (v.organizationId = b.organizationId) " +
"WHERE b.userId = 101 " +
"GROUP BY b.organizationId " +
"ORDER BY votedPoint ascending ";
EntityManager em = getEntityManager();
Query query = em.createQuery(queryString);
query.setFirstResult(start);
query.setMaxResults(numRecords);
List results = query.getResultList();
I don't know what is wrong with my query because it gives me this error:
java.lang.NoSuchMethodError: org.hibernate.hql.antlr.HqlBaseParser.recover(Lantlr/RecognitionException;Lantlr/collections/impl/BitSet;)V at org.hibernate.hql.antlr.HqlBaseParser.fromJoin(HqlBaseParser.java:1802) at org.hibernate.hql.antlr.HqlBaseParser.fromClause(HqlBaseParser.java:1420) at org.hibernate.hql.antlr.HqlBaseParser.selectFrom(HqlBaseParser.java:1130) 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:271) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:180) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:134) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:101) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:80) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1650)
Thanks.