Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
I am getting RecognitionException, when executing a Named Query in Hibernate3.0.5.
When I run the same sample with Hibernate 3.1, I get no such exception.
I have included antlr-2.7.5.jar in my classpath, but it doesnt seem to work at all.
This is my query :
<query name="AUDITPK">
SELECT AUDIT_PK_SEQ.NEXTVAL FROM DUAL
</query>
This is the stacktrace :
java.lang.NoClassDefFoundError: antlr/RecognitionException
at org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:27)
at org.hibernate.impl.SessionFactoryImpl.createQueryTranslators(SessionFactoryImpl.java:357)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:423)
at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:388)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:291)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at com.jpmchase.pws.util.hibernate.HibernateSessionUtil.initSessionFactory(HibernateSessionUtil.java:49)
at com.jpmchase.pws.util.hibernate.HibernateSessionUtil.getSessionFactory(HibernateSessionUti
Thanks in advance,
Pooja
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: