Replace Hibernate 3 with 4