Upgrade Hibernate, fix compile error with new Hibernate.