Theeasiest way to validate the connection is to tell Oracle that the connection must be validated while borrowing it. This can be done with. pool.setValidateConnectionOnBorrow (true); But it works only if you hold the connection for a short period. If you borrow the connection for a longer time, it is likely that the connection gets broken reducerepeat code. hibernate reduces the amount of repeating lines of code , which you can often find with jdbc. for your understanding, i have left a simple scenario below. 9. 1. class.forname Whenusing the same XML for both User ID and Group ID, and trying to "save" the Group ID (XML location), you receive this JDBC error: Internal Application Error: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update. Solution: Ive tried, as you mentioned, to change to older verson MySQL Connector/J 5.1.46 (also 8.0.11 which contains both variants of connections strings) as dependency in POM & write in database.properties dbDriver=com.mysql.jdbc.Driver & recreate war using Edit configuration in Intelij IDEA by choosing Tomcat Server (Local), but it still doesn't work. What I'm doing wrong here? Thisis my entity Class package com.GigaTechnologies.org.model; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax Theexception, as predictable, happens on @Transactional's commit phase. It is correct that the exception is thrown by JDBC to Hibernate, but should be translated by Spring using my code, so that Spring @Retry can replay the transaction again. I0V1lxx.

jdbc exception on hibernate data access sqlexception for sql