while try to run this prg it will display error,
April 19, 2007 at 3:27 PM
while try to run this prg it will display error like this: but i cant uble to rectify it... can any one do the needful.. public class Testhql { public static void main(String[] args) { Session session = null;
try{ // This step will read hibernate.cfg.xml and prepare hibernate for use SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); session =sessionFactory.openSession();
output: log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/Synchronization at org.hibernate.impl.SessionFactoryImpl.buildCurrentSessionContext(SessionFactoryImpl.java:999) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:334) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) at techm.Testhql.main(Testhql.java:13)