-->
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.  [ 4 posts ] 
Author Message
 Post subject: HQL NoSuchFieldError meaning ?
PostPosted: Sun Mar 20, 2005 4:55 pm 
Beginner
Beginner

Joined: Wed Feb 04, 2004 5:21 pm
Posts: 37
I am in the process of converting from Hibernate2 to Hibernate3, and is trying to run my jUnit tests.

I apparently get a NoSuchFieldError when trying to query the PhoneModel table.

List models = session.createQuery("from PhoneModel p where p.userAgent=:ua").setString("ua",ph.getUserAgent()).list();

The exception was:

java.lang.NoSuchFieldError: tokenTypeToASTClassMap at org.hibernate.hql.antlr.HqlBaseParser.buildTokenTypeASTClassMap(HqlBaseParser.java:3871) 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:202) 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:414) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:814) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:773) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74) at

The field userAgent is indeed present in the config and java files. So what is it referring to ?

Henrik


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 15, 2005 11:43 am 
Newbie

Joined: Thu Mar 03, 2005 2:26 pm
Posts: 4
I have the exactly same problem. Has any one know how to solve this problem?

Thanks,
Jian


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 15, 2005 3:52 pm 
Newbie

Joined: Thu Mar 03, 2005 2:26 pm
Posts: 4
I finally found the problem. The problem is that the antlr-2.7.4.jar file has to be before weblogic.jar in the classpath otherwise you will get that exception.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 24, 2005 3:48 am 
Newbie

Joined: Sun Jul 24, 2005 3:41 am
Posts: 1
Thanks chenbibi, it really works!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.