isConnected is not valid without active transaction报错原因
程序员文章站
2022-04-15 18:37:45
...
isConnected is not valid without active transaction:如果没有活动事务,isConnected将无效。
Session session = sessionFactory.getCurrentSession();
session.beginTransaction();//加个事务
上一篇: angularjs $http.get 和 $http.post 传递参数
下一篇: mysql The transaction associated with this command is not the connection’s active transaction
推荐阅读
-
getHibernateFlushMode is not valid without active transaction;
-
isConnected is not valid without active transaction报错原因
-
spring和hibernate整合时异常(详解): getFlushMode is not valid without active transaction
-
SSH下Hibernate事务问题createCriteria is not valid without active transaction
-
spring+hibernate4异常org.hibernate.HibernateExc和createCriteria is not valid without active transaction