permaculture playing cards
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(
at org.hibernate.hql.antlr.HqlBaseParser.<init>(
at org.hibernate.hql.antlr.HqlBaseParser.<init>(
at org.hibernate.hql.ast.HqlParser.<init>(
at org.hibernate.hql.ast.HqlParser.getInstance(
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(
at org.hibernate.engine.query.HQLQueryPlan.<init>(
at org.hibernate.engine.query.HQLQueryPlan.<init>(
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(
at org.hibernate.impl.AbstractSessionImpl.createQuery(
at org.hibernate.impl.SessionImpl.createQuery(
at SelectHQLExample.main(



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

Joined: Feb 05, 2001
Posts: 17276

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 - iOS Apps
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:
subject: Exception in thread "main" java.lang.NoSuchFieldError: tokenTypeToASTClassMap
It's not a secret anymore!