Saturday, July 17, 2010

Hibernate No CurrentSessionContext Exception

Hi

While starting hibernate you might get the following exception

org.hibernate.HibernateException: No CurrentSessionContext configured!

The reason for the above error is the property "current_session_context_class" is missing

The solution you need to follow is to add
<property name="current_session_context_class">thread</property>
in the hibernate.cfg.xml file

A Ram Prasad

No comments:

Post a Comment