title: how to fix the error: "INFO: HHH000206: hibernate.properties not found"?
body: <p>I tried to test whether the hibernate configuration is working properly. I tried but I got an error:</p>
  
  <pre><code>INFO: HHH000206: hibernate.properties not found
  </code></pre>
  
  <p>To do this: I create:</p>
  
  <p>[1] hibernate configuration file [using xml]</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                           "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt;
  &lt;hibernate-configuration&gt;
   &lt;session-factory name=""&gt;
    &lt;property name="hibernate.connection.driver_class"&gt;com.mysql.jdbc.Driver&lt;/property&gt;
    &lt;property name="hibernate.connection.url"&gt;jdbc:mysql://localhost:3306&lt;/property&gt;
    &lt;property name="hibernate.connection.username"&gt;root&lt;/property&gt;
    &lt;property name="hibernate.default_schema"&gt;explorecalifornia&lt;/property&gt;
    &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/property&gt;
    &lt;property name="hibernate.format_sql"&gt;true&lt;/property&gt;
    &lt;property name="hibernate.connection.password"&gt;abc123&lt;/property&gt;
   &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>[2] A hibernate utility class</p>
  
  <pre><code>public class HibernateUtilities {
  
      private static SessionFactory sessionFactory;
      private static ServiceRegistry serviceRegistry;
  
      static{
          try{
              Configuration configuration = new Configuration().configure();
  
              serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();
              sessionFactory = configuration.buildSessionFactory(serviceRegistry);
          }
  
          catch(HibernateException exception){
              System.out.println("Problem creating session factory");
          }
      }
  
      public static SessionFactory getSessionFactory() {
          return sessionFactory;
      }
  
      public static void setSessionFactory(SessionFactory sessionFactory) {
          HibernateUtilities.sessionFactory = sessionFactory;
      }
  
  
  }
  </code></pre>
  
  <p>[3] The main program:</p>
  
  <pre><code>import org.hibernate.Session;
  
      public class Program {
  
          public static void main(String[] args) {
              System.out.println("Hibernate");
  
              Session session = HibernateUtilities.getSessionFactory().openSession();
              session.close();
  
          }
  
      }
  </code></pre>
  
  <p>But i got the following thing when I run the program:</p>
  
  <pre><code>Hibernate
  Sep 29, 2013 10:47:15 PM org.hibernate.annotations.common.Version &lt;clinit&gt;
  INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
  Sep 29, 2013 10:47:15 PM org.hibernate.Version logVersion
  INFO: HHH000412: Hibernate Core {4.2.5.Final}
  Sep 29, 2013 10:47:15 PM org.hibernate.cfg.Environment &lt;clinit&gt;
  INFO: HHH000206: hibernate.properties not found
  Sep 29, 2013 10:47:15 PM org.hibernate.cfg.Environment buildBytecodeProvider
  INFO: HHH000021: Bytecode provider name : javassist
  Sep 29, 2013 10:47:15 PM org.hibernate.cfg.Configuration configure
  INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
  Sep 29, 2013 10:47:15 PM org.hibernate.cfg.Configuration getConfigurationInputStream
  INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
  Problem creating session factory
  Exception in thread "main" java.lang.NullPointerException
      at com.simpleprogrammer.Program.main(Program.java:10)
  </code></pre>
  
  <p>To solve this I tried Google and apply the ways which i found. but still i could not solve the problem. Can anybody please help me?</p>