-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: NoSuchFieldError: tokenTypeToASTClassMap
PostPosted: Tue Jun 07, 2005 4:21 pm 
Newbie

Joined: Tue Jun 07, 2005 4:08 pm
Posts: 3
Hi folks,

I've been reading the forum and appreciate all of the useful information here, which has helped me tremendously. I'm running WebLogic 7.0 sp2 and have gotten Hibernate 3 to run successfully there. I went through the antlr issue described here on the forum, and was able to put Hibernate's antlr version in the weblogic classpath. However, there seems to be problem parsing queries named in the mapping files.

The error I'm getting is java.lang.NoSuchFieldError: tokenTypeToASTClassMap. I've searched extensively and can't find anything on this related to Hibernate. Also the source code for the offending class (org.hibernate.hql.antlr.HqlBaseParser) doesn't seem to be available in the Hibernate distribution or the online CVS browser.

The only thing I can figure is it has something to do with the version of antlr, but since I have antlr-2.7.5H3.jar in the weblogic classpath ahead of weblogic.jar, I'm at a loss to understand why. Any help would be appreciated!

Hibernate version: Hibernate 3.0.3

Full stack trace of any exception that occurs:

java.lang.NoSuchFieldError: tokenTypeToASTClassMap
at org.hibernate.hql.antlr.HqlBaseParser.buildTokenTypeASTClassMap(HqlBaseParser.java:4290)
at org.hibernate.hql.antlr.HqlBaseParser.<init>(HqlBaseParser.java:107)
at org.hibernate.hql.antlr.HqlBaseParser.<init>(HqlBaseParser.java:112)
at org.hibernate.hql.ast.HqlParser.<init>(HqlParser.java:47)
at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:42)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:203)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:425)
at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:386)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:289)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)

Name and version of the database you are using: Oracle8i Enterprise Edition Release 8.1.7.4.0


Top
 Profile  
 
 Post subject: Newbie tries to help
PostPosted: Wed Jun 08, 2005 1:44 am 
Newbie

Joined: Thu Jul 01, 2004 9:09 am
Posts: 16
Location: USA
I'm new with hibernate but I saw the same problem that you did today and just wanted to pipe up in case I can help.

I was getting a similar exception and tries googling for some help. I learned about the need for the proper version of antlr in the classpath and in my case that solved the problem. I moved the antlr version provided w/hibernate (3.0.5 in my case) to the top of my classpath (as opposed to the bottom) and all was well after that.

I realize you've tried this solution.

Do you possibly have a "bad" version of antlr in your classpath, for example in your jre's lib/ext dir?

Perhaps you can figure out where the JVM is locating the antlr classes?

Perhaps you could try hibernate 3.0.5?

Good luck!

John


Top
 Profile  
 
 Post subject: Re: Newbie tries to help
PostPosted: Wed Jun 08, 2005 10:01 am 
Newbie

Joined: Tue Jun 07, 2005 4:08 pm
Posts: 3
John,

thanks alot for your reply. From what you've said and what I've seen on Google, it does sound like an antlr version problem. Frustrating, because I can't seem to track it down. I won't be able to change Hibernate versions because another end of the application is using Hibernate (but not Weblogic) and so we need to be consistent in our versions. In fact it is that team's mapping files which I am reusing and having the problems with. Anyway, your suggestions are definitely helpful!

Liz

jlindwall wrote:
I'm new with hibernate but I saw the same problem that you did today and just wanted to pipe up in case I can help.

I was getting a similar exception and tries googling for some help. I learned about the need for the proper version of antlr in the classpath and in my case that solved the problem. I moved the antlr version provided w/hibernate (3.0.5 in my case) to the top of my classpath (as opposed to the bottom) and all was well after that.

I realize you've tried this solution.

Do you possibly have a "bad" version of antlr in your classpath, for example in your jre's lib/ext dir?

Perhaps you can figure out where the JVM is locating the antlr classes?

Perhaps you could try hibernate 3.0.5?

Good luck!

John


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 08, 2005 12:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
read the migration guide - has a special section for weblogic

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 08, 2005 12:38 pm 
Newbie

Joined: Tue Jun 07, 2005 4:08 pm
Posts: 3
max wrote:
read the migration guide - has a special section for weblogic


Yes ... I had already read that as well as other resources and discussions, and understand the issues described there. The migration guide does not address the particular problem I'm seeing.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 08, 2005 12:43 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
did you try and do what is told about weblogic ?

(adding antlr in weblogics lib path ?)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.