posted 16 years ago
Seems your sessionFactory is null, did you instantiate your sessionFactory?
Check how did you implement the HibernateUtil.java. Is there anything you obtained by using JNDI look up? Where did you put your hibernate.cfg.xml
file, if the path is correct?
In addition, Why not use sessionFactory.getCurrentSession()? By getting the session this way, you do not bother to close the session. Do not forget to config your hibernate.cfg.xml file when you want to use getCurrentSession().
[ December 17, 2008: Message edited by: damu liu ]