Keep getting org.hibernate.exception.JDBCConnectionException: could not execute query

前端 未结 2 502
醉梦人生
醉梦人生 2021-01-23 05:15

I\'ve got a J2EE application which uses JSP pages as front end and Struts2 as controller. I also use Hibernate to map my objects into a MySql DB. when I deploy the application o

2条回答
  •  猫巷女王i
    2021-01-23 06:03

    Once I get a similary looking exception, when I used a connection pool and the connection was closed after some time, but the pool did not recognized it.

    What helped me in this case was to add a validation query to my data source:

    
      ...
      
    
    

提交回复
热议问题