title: Hibernate 4.3.5 is not working with Oracle10g Database
body: <p>I am trying out Hibernate 4.3.5 with Oracle Database. 
  But during run I am getting the following problem(The same code is working fine with MySQl database).</p>
  
  <pre><code>org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
  INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
  Jun 26, 2014 10:35:46 AM org.hibernate.engine.jdbc.internal.JdbcServicesImpl configure
  WARN: HHH000341: Could not obtain connection metadata : Unsupported feature
  Jun 26, 2014 10:35:46 AM org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
  INFO: HHH000422: Disabling contextual LOB creation as connection was null
  Exception in thread "main" java.lang.NullPointerException
  at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:244)
  at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
  at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885)
  at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843)
  at com.cluster.HibernateMain.main(HibernateMain.java:29)
  </code></pre>
  
  <p>My code is</p>
  
  <p>hibernate.cfg.xml</p>
  
  <pre><code>   &lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
      &lt;!-- Database connection properties - Driver, URL, user, password --&gt;
          &lt;property name="hibernate.connection.driver_class"&gt;oracle.jdbc.driver.OracleDriver&lt;/property&gt;
          &lt;property name="hibernate.connection.url"&gt;jdbc:oracle:thin:@localhost:1521:xe&lt;/property&gt;
          &lt;property name="hibernate.connection.username"&gt;hr&lt;/property&gt;
          &lt;property name="hibernate.connection.password"&gt;hr&lt;/property&gt;
          &lt;property name="hibernate.hbm2ddl"&gt;create&lt;/property&gt;
  
  
          &lt;!-- org.hibernate.HibernateException: No CurrentSessionContext configured! --&gt;
          &lt;property name="hibernate.current_session_context_class"&gt;thread&lt;/property&gt;
  
          &lt;!-- Outputs the SQL queries, should be disabled in Production --&gt;
          &lt;property name="hibernate.show_sql"&gt;true&lt;/property&gt;
  
          &lt;!-- Dialect is required to let Hibernate know the Database Type, MySQL, Oracle etc
              Hibernate 4 automatically figure out Dialect from Database Connection Metadata --&gt;
          &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/property&gt; 
  
          &lt;!-- mapping file, we can use Bean annotations too --&gt;
          &lt;mapping resource="com\cluster\employee.hbm.xml" /&gt;
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>employee.hbm.xml</p>
  
  <pre><code>&lt;hibernate-mapping&gt;
      &lt;class name="com.cluster.Employee" table="EMPLOYEE"&gt;
          &lt;id name="id" type="int"&gt;
              &lt;column name="ID" /&gt;
              &lt;generator class="increment" /&gt;
          &lt;/id&gt;
          &lt;property name="name" type="java.lang.String"&gt;
              &lt;column name="NAME" /&gt;
          &lt;/property&gt;
          &lt;property name="role" type="java.lang.String"&gt;
              &lt;column name="ROLE" /&gt;
          &lt;/property&gt;
          &lt;property name="insertTime" type="timestamp"&gt;
              &lt;column name="insert_time" /&gt;
          &lt;/property&gt;
      &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>And the client code is </p>
  
  <pre><code>public class HibernateMain {
  
      public static void main(String[] args) {
          Employee emp = new Employee();
          emp.setName("Amr");
          emp.setRole("President");
          emp.setInsertTime(new Date());
  
  
  
       // Create the SessionFactory from hibernate.cfg.xml
          Configuration configuration = new Configuration();
          configuration.configure();
          System.out.println("Hibernate Configuration loaded");
  
          ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().applySettings(configuration.getProperties()).build();
          System.out.println("Hibernate serviceRegistry created");
  
          SessionFactory sessionFactory = configuration.buildSessionFactory(serviceRegistry);
  
          //Get Session
          Session session = sessionFactory.getCurrentSession();
  
  
          //start transaction
          session.beginTransaction();
          //Save the Model object
          session.save(emp);
          //Commit transaction
          session.getTransaction().commit();
          System.out.println("Employee ID="+emp.getId());
  
          //terminate session factory, otherwise program won't end
          sessionFactory.close();
      }
  
  }
  </code></pre>
  
  <p>Jars what I am using are 
  <img src="https://i.stack.imgur.com/MbJjj.jpg" alt="enter image description here"></p>
  
  <p>What the thing I am missing ?
  Thanks in advance.</p>