could not open hibernate session for transactio

来源:百度知道 编辑:UC知道 时间:2024/05/23 14:54:35
could not open hibernate session for transactio;nested exception is org.hibernate.transactionexception:jdbc begin failed:
这是什么问题??偶尔会出现.

Maybe 缓存同步的问题
您可以
这样获取Session
Session session =HibernateSessionFactory.getSessionFactory().getCurrentSession();
试试
也可是修改Hibernate *.hbm.xml中添加修改一个 lazy属性为false 默认为 true
~$$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~