Changed Hibernate util to build the serviceregistry correctly