Hibernate 休眠会话在一段时间后关闭

Hibernate 休眠会话在一段时间后关闭,hibernate,spring-mvc,spring-security,Hibernate,Spring Mvc,Spring Security,我试图在运行ubuntu的家庭网络服务器上测试我的应用程序,但我注意到,如果我打开一个会话,然后过一段时间再回来尝试登录,就会抛出以下错误: Reason: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin transaction failed: Reason: Could not roll back Hiber

我试图在运行ubuntu的家庭网络服务器上测试我的应用程序,但我注意到,如果我打开一个会话,然后过一段时间再回来尝试登录,就会抛出以下错误:

Reason: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin transaction failed:
Reason: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: rollback failed
如果我再次尝试登录,它会抛出以下错误:

Reason: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin transaction failed:
Reason: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: rollback failed
我没有任何其他东西可以使用,因为这些日志即使在windows上也无法正常工作

我也不完全确定这样做的原因是让会议继续进行,还是仅仅因为长时间的不活动。
我知道信息太少,无法处理,但我希望有人能给我一些建议。提前感谢。

每次请求任何数据库操作时,您都必须在完成后打开会话并关闭会话。如果会话无法保持很长时间,则必须关闭会话以释放数据库连接(如果该会话正在进行)。