Hibernate calls hang after giving message “opening JDBC connection”

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.

Kj [/.] Sreekumar programs computers as a hobby and profession. Into programming from his school days, Sree uses Codemarvels to key in facts and fixes he finds interesting while working on different projects. Some of the articles here give away a few shades of his philosophical leanings too.

Leave a Comment

Your email address will not be published. Required fields are marked *