org.hibernate.HibernateException: No CurrentSessionContext configured!
構成されたhibernateで実行中に次のエラーが見つかりました
インターネットgoogleの下で解決策を見つけます:
hibernateでcfg.xmlにsession-factoryセグメントが追加されます.
1)Hibernateを統合した環境(例えばJboss)、
2)Hibernateを統合しない環境(例えばJDBCを使用した独立したアプリケーション)、
Exception in thread "main" org.hibernate.HibernateException: No CurrentSessionContext configured!
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:620)
インターネットgoogleの下で解決策を見つけます:
hibernateでcfg.xmlにsession-factoryセグメントが追加されます.
1)Hibernateを統合した環境(例えばJboss)、
<property name="current_session_context_class">jta</property>
2)Hibernateを統合しない環境(例えばJDBCを使用した独立したアプリケーション)、
<property name="current_session_context_class">thread</property>