Bug: Hibernate calls hang after giving the message “opening JDBC connection” in the logs. No exception/error message is thrown.
Reason: Connection timeout not set for the connection pooled datasource.
Solution: Set connection timeout for the datasource. In case of a basic datasource (apache), add and set property maxwait to the number of microseconds after which a timeout error is to be thrown.

Sreekumar (KJ) has been a hobby programmer from school days. Codemarvels is his personal blog from the year 2010, where he writes about technology, philosophy, society and a bit about physics.
He now runs a conversational AI company – DheeYantra – focusing his efforts to help businesses improve operational efficiency using digital employees powered by AI.