org.hibernate.HibernateException: connnection proxy not usable after transaction

org.hibernate.HibernateException: connnection proxy not usable after transaction completion 
at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:42) 
at $Proxy10.prepareStatement(Unknown Source) 
at com.bjqa.crm.zizhu.ddgl.biz.DzfddDao.doUpdateDdzt(DzfddDao.java:714) 
at com.bjqa.crm.zizhu.ddgl.biz.DzfddDao.OrderSettlement(DzfddDao.java:619) 
at com.bjqa.crm.zizhu.ddgl.action.DdzfServletAction.doPost(DdzfServletAction.java:113) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 

 

 

1. mix hibernate + jdbc?  

2, con = DBPool.getInstance () getConnection ();. Acquisition proposal directly using the session, do not need to shut itself down, by the spring transaction management;  

3, try not to mix, if the mix hibernate second level cache problems that may occur

 

4. unified connection pool management

Reproduced in: https: //my.oschina.net/xiaominmin/blog/551514

Guess you like

Origin blog.csdn.net/weixin_34414196/article/details/92520356