wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Exception in thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Exception in thread "main" java.lang.NoSuchFieldError: tokenTypeToASTClassMap" Watch "Exception in thread "main" java.lang.NoSuchFieldError: tokenTypeToASTClassMap" New topic

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

sreenivas jeenor
Ranch Hand

Joined: Jan 09, 2005
Posts: 125
Hi All,

I am using Hibernate3.2 for my application.

under Lib directory i have placed following jar files..

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)



[ Edited to use code tags - Paul Sturrock ]
[ July 05, 2007: Message edited by: Paul Sturrock ]
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17249

Please do not duplicate post. Even if someone doesn't reply to your original thread. I have deleted the duplicate thread already.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
sreenivas jeenor
Ranch Hand

Joined: Jan 09, 2005
Posts: 125

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.

I agree. Here's the link: http://aspose.com/file-tools
subject: Exception in thread "main" java.lang.NoSuchFieldError: tokenTypeToASTClassMap
Similar Threads
Error: unexpected token: c
Problem with select query in hibernate
Difference in session.createQuery() and session.createSqlQuery()
Getting error in Hibernate program
Hibernate Desing issue