I'm new to JPA & Hibernate, I'm performing reset password action. In that case, the entity object (User) is getting updated after that I'm trying to log-in but unfortunately, the server is hung and I was getting the below exception.
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Unable to release JDBC Connection
Below is our persistence file configuration
<properties>
<!-- Configuring JDBC properties -->
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://127.0.0.1:3306/dbname?autoReconnect=true&useUnicode=true" />
<property name="javax.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver" />
<property name="javax.persistence.jdbc.user" value="username" />
<property name="javax.persistence.jdbc.password" value="password" />
<property name="hibernate.jdbc.batch_size" value="80000" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.format_sql" value="false" />
<property name="hibernate.use_sql_comments" value="false" />
<property name="hibernate.hbm2ddl.auto" value="none" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.connection.charSet" value="UTF-8" />
<property name="hibernate.max_fetch_depth" value="2" />
<!-- Configuring Connection Pool -->
<property name="hibernate.c3p0.min_size" value="10" />
<property name="hibernate.c3p0.max_size" value="250" />
<property name="hibernate.c3p0.acquire_increment" value="10"/>
<property name="hibernate.c3p0.timeout" value="500" />
<property name="hibernate.c3p0.max_statements" value="50" />
<property name="hibernate.c3p0.idle_test_period" value="2000" />
<!-- Newly added -->
<property name="hibernate.c3p0.maxConnectionAge" value="300"/>
<property name="hibernate.c3p0.maxIdleTimeExcessConnections" value="300"/>
<property name="hibernate.c3p0.testConnectionOnCheckin" value="true"/>
<property name="hibernate.c3p0.preferredTestQuery" value="select 1"/>
<property name="hibernate.c3p0.validate" value="false"/>
<property name="hibernate.c3p0.testConnectionOnCheckout" value="false" />
</properties>
Can anyone help me what I made mistake? anything I missed in the configuration file?