This usually means there is a lock on the database somewhere.
The first thing to do is make sure everything is closed. I don't know how to do this in hibernate.
I'm not sure about the "forgotten lock". In my experience, a session can wait for many hours for a lock in Oracle. However, I have only tried with SQL*plus, not with JDBC, so I may be wrong.
I'd suggest to check the database logs for possible errors.
This OTN thread mentions the culprit might be an invalid connection handed out by the connection pool; setting the pool to validate the connections could solve the issue.