Hibernate + java

Srinivasu_V
Srinivasu_V used Ask the Experts™
on
I've added the antlr.jar file also, but i'm getting the following Exception, while running Hibernate simple example (select query).

Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.hql.antlr.HqlBaseParser: method recover(Lantlr/RecognitionException;Lantlr/collections/impl/BitSet;)V not found
      at org.hibernate.hql.antlr.HqlBaseParser.selectClause(HqlBaseParser.java:1391)
      at org.hibernate.hql.antlr.HqlBaseParser.selectFrom(HqlBaseParser.java:1106)
      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:248)
      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)
      at TestEx2.main(TestEx2.java:34)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
It appears to me as version mismatch. Which hibernate, ant
antlr version you are using?

Author

Commented:
I'm using hibernate3.jar & antlr-2.7.4.jar. I'm just practicing a sample select query example, i'm not using any Ant.
Try with hibernate-3.3-SP1 with antlr-2.7.7 version

Author

Commented:
I've updated to antlr-3.1.3.jar file, then its working fie....   Its version mismatch only.  Thnx.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial