Hibernate 3 - run sample error,
May 13, 2008 at 10:08 AM
I followed the tutorial but can not run the example. I got the following exception when running the sample code: Exception in thread "main" java.lang.NullPointerException at roseindia.tutor.hibernate.FirstExample.main(FirstExample.java:39)
I tried to degub, and find out that after the below line (create a new SessionFactory object): SessionFactory sf = new Configuration().configure().buildSessionFactory(); the programm went to session.flush() at the finally block.