• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exception in thread "main" java.lang.NoSuchFieldError: tokenTypeToASTClassMap

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am using Hibernate3.2 for my application.

under Lib directory i have placed following jar files..
-------------------------------------------------------------
hibernate3.jar,jta.jar,antlr-2.7.6.jar,asm.jar,asm-attrs.jar,cglib-2.1.3.jar,commons-collections-2.1.1.jar,commons-logging-1.0.4.jar,dom4j-1.6.1.jar,log4j-1.2.11.jar
-------------------------------------------------------------------

Here is My program
-------------------

---------------------------------------
When i run the above program the following error i am getting,please help to solve this issue..
----------------------------------------

Exception in thread "main" java.lang.NoSuchFieldError: tokenTypeToASTClassMap
at org.hibernate.hql.antlr.HqlBaseParser.buildTokenTypeASTClassMap(HqlBaseParser.java:4559)
at org.hibernate.hql.antlr.HqlBaseParser.<init>(HqlBaseParser.java:116)
at org.hibernate.hql.antlr.HqlBaseParser.<init>(HqlBaseParser.java:121)
at org.hibernate.hql.ast.HqlParser.<init>(HqlParser.java:49)
at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:45)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:242)
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 SelectHQLExample.main(SelectHQLExample.java:20)

---------------------------------

Thanks

[ Edited to use code tags - Paul Sturrock ]
[ July 05, 2007: Message edited by: Paul Sturrock ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please do not duplicate post. Even if someone doesn't reply to your original thread. I have deleted the duplicate thread already.

Mark
 
sreenivas jeenor
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ALL

ANTL is a parser used to analyse the HQL request, and I knew the problem was coming from it but how and why ?

I was using antlr 2.7.7, I tried antlr 2.7.6, 2.7.5 ..., nothing changed. There was only one antlr like jar in my classpth.

So, I took my project and put antlr to the top of my classpath and all worked fine.

Thanks.
 
We're all out of roofs. But we still have tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic