Exception in thread "main"org.hibernate.HibernateException: No CurrentSessionContext configured!
640 ワード
Hibernateがキャッシュクエリを使用してエラーが発生しました:
ソリューション:
hibernate.cfg.xnlに次のコードを追加します.
再稼働すれば良いのですが
Exception in thread "main" org.hibernate.HibernateException: No CurrentSessionContext configured!
at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:1012)
at com.mao.secondCache.NewManager.secondCacheTest(NewManager.java:44)
at com.mao.secondCache.NewManager.main(NewManager.java:39)
ソリューション:
hibernate.cfg.xnlに次のコードを追加します.
<!-- Session -->
<property name="hibernate.current_session_context_class">thread</property>
再稼働すれば良いのですが