Hello,
I am developing an application with Struts2 & Hibernate (using netbeans 7.0.1), and i am trying to execute this code in the action class
Code:
try {
Session session = NewHibernateUtil.getSessionFactory().openSession();
session.beginTransaction(); //Démarrer la transaction
Query q = session.createQuery(hql);
System.out.println(q);
List resultList = q.list(); // Exécuter la requête et récupérer le résultat sous forme de List
// displayResult(resultList);
session.getTransaction().commit(); //Récupérer la transaction et la valider
} catch (HibernateException he) {
he.printStackTrace();
}
I have this error while running my app :
Code:
GRAVE: Initial SessionFactory creation failed.java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
Any help will be much appreciated??