Hibernate gives “No CurrentSessionContext configured” error

Mar 12th, 2006

If you use Hibernate in a managed environment (with JBoss or some other AS that Hibernate supoorts). Add this line to session-factory section:

<property name=”hibernate.current_session_context_class” >jta </property>

If you use Hibernate in a non-managed environment (standalone application with JDBC). Add this line:

<property name=”hibernate.current_session_context_class” >thread </property>

No comments yet.

Time limit is exhausted. Please reload the CAPTCHA.