This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
sreenivas jeenor
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • 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 ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic