Hallo everbody,
I'm new to Hibernate and I am trying to run the example (chapter 1) of the reference documentation (Events, Persons, ...).
Unfortunately there seems to be a big problem while using the line of code
Code:
List result = session.createQuery("from Event").list();
The following Exception ist thrown:
Code:
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at $Proxy0.createQuery(Unknown Source)
at events.EventManager.listEvents(EventManager.java:79)
at events.EventManager.main(EventManager.java:18)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:292)
... 3 more
Caused by: java.lang.NoClassDefFoundError: antlr/ANTLRException
at org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:31)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:71)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:53)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:108)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:88)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1540)
... 8 more
Hibernate version: 3.1
Mapping documents:Indentical to introductory example printed in chapter 1 of the reference doc.
Code between sessionFactory.openSession() and session.close():indentical to the introduction (chapter 1 of reference doc)
The Problem occurs using Java 5.0 and JDK 1.4.
I have checked everything very carfully and the forum doesn't seem to offer o document addressing this problem. So, please, could someone give me a hint, what to do?
Thanks in advance
Peter[/b][/code]