I am trying to run this http://www.tutorialspoint.com/hibernate/hibernate_examples.htm it blows up on
factory = new Configuration().configure().buildSessionFactory();
so I followed the instructions on how to do it in version 4
private static SessionFactory configureSessionFactory() throws HibernateException {
Configuration configuration = new Configuration();
configuration.configure();
serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();
sessionFactory = configuration.buildSessionFactory(serviceRegistry);
return sessionFactory;
}
but it cant find ServiceRegistry, this fails
import org.hibernate.ServiceRegistry;
and indeed it's missing from the jar files which I imported from the /hibernate-search-4.4.2.Final I downloaded, i.e. it's not in hibernate-core-4.2.8.Final.jar