Consider the hierarchy :

And the following classes and xml :
If you are using 5.0x version,configuration with standard service registry is deprecated.
Instead you should bootstrap it with Metadata: In your HibernateUtil class, you should add
private static SessionFactory buildSessionFactory() {
try {
StandardServiceRegistry standardRegistry = new StandardServiceRegistryBuilder()
.configure( "hibernate.cfg.xml" )
.build();
Metadata metadata = new MetadataSources( standardRegistry )
.getMetadataBuilder()
.build();
return metadata.getSessionFactoryBuilder().build();
} catch(...) {
...
}
}