Hi I am new to Hibernate. I just started working with the tutorial which is supplied with the reference. While I was strictly following the steps mentioned in the tutorial. I am just struck up at one point while trying to list the events from the EVENTS table, which throws an unDeclaredException and gives me a message as follows:
[java] 20:45:25,031 DEBUG QueryPlanCache:69 - unable to locate HQL query plan in cache; generating (from Event)
[java] java.lang.reflect.UndeclaredThrowableException
The method I have written for listing events is as follows:
Code:
private List listEvents(){
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
List result = session.createQuery("from Event").list();
session.getTransaction().commit();
return result;
}
I am using
Hibernate 3.0 and the database I am using is
MySQL 5.0.
Can anyone explain me why I couldnt list out the events and help me in resolving this issue. Please Help me!