Removed usage of deprecated Hibernate classes