title: java.lang.NoSuchMethodError: org.hibernate.cfg.Environment.verifyProperties
body: <p>While trying to build the session factory I get this. Very little turns up in an Internet search. But it's got me dead-in-the-water for days now. Thanks.</p>
  
  <pre><code>java.lang.NoSuchMethodError: org.hibernate.cfg.Environment.verifyProperties(Ljava/util/Map;)V
  at   org.hibernate.service.ServiceRegistryBuilder.buildServiceRegistry(ServiceRegistryBuilder.java:244)
  </code></pre>
  
  <p>Using hibernate version:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
    &lt;artifactId&gt;hibernate-c3p0&lt;/artifactId&gt;
    &lt;version&gt;4.1.1.Final&lt;/version&gt;
    &lt;type&gt;jar&lt;/type&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
    &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
    &lt;version&gt;4.1.1.Final&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>public class HibernateUtils {
  
  private static final String DATABASE_HOST = "host_to_db";
  
  private static SessionFactory factory;
  private static ServiceRegistry serviceRegistry;
  
  public static void init() {
  Configuration config = getConfiguration();
  config.configure();
  
  serviceRegistry = new ServiceRegistryBuilder().applySettings(
  config.getProperties()).buildServiceRegistry();
  
  config.setSessionFactoryObserver(new SessionFactoryObserver() {
  
  @Override
  public void sessionFactoryCreated(SessionFactory factory) { }
  
  @Override
  public void sessionFactoryClosed(SessionFactory factory) {
  ServiceRegistryBuilder.destroy(serviceRegistry);
  }
  });
  
  factory = config.buildSessionFactory(serviceRegistry);
  }
  </code></pre>