Make sure we always close the session.

Also reference the version of hibernate with problems.