title: null pointer exception hibernate on creating sessionfactory
body: <p>Hi i trying to write my first Hibernate program,
  its giving an error while instantiating the session factory.
  I'm using hibernate 5.0.4 &amp; java 8 &amp; eclipse Luna SR1 (4.4.1) &amp; oracle 11g.</p>
  
  <p>MainClass is:</p>
  
  <pre><code>public class MainMethod {
  public static void main(String[] args) {
      SampleClass s = new SampleClass();
      s.setId(1);
      s.setValue("Value_1");
  
      SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
  
      Session session = sessionFactory.openSession();
      session.beginTransaction();
      session.save(s);
      session.getTransaction().commit();      
  }
  }
  </code></pre>
  
  <p>the hibernate.cfg.xml is </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&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:mndb11g&lt;/property&gt;
    &lt;property name="hibernate.connection.username"&gt;temp_p&lt;/property&gt;
    &lt;property name="hibernate.connection.password"&gt;temp_p&lt;/property&gt;
    &lt;property name="connection.pool_size"&gt;1&lt;/property&gt;
  
    &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/property&gt;
    &lt;property name="hibernate.default_schema"&gt;temp_p&lt;/property&gt;
  
    &lt;property name="hbm2ddl.auto"&gt;create&lt;/property&gt;
    &lt;property name="show_sql"&gt;true&lt;/property&gt;
  
    &lt;mapping class="com.h.SampleClass.SampleClass"/&gt;
  
  &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>Its giving an exception at</p>
  
  <pre><code>SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
  </code></pre>
  
  <p>The exception stack trace is </p>
  
  <pre><code>    Exception in thread "main" java.lang.NullPointerException
      at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.getResources(ClassLoaderServiceImpl.java:173)
      at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:348)
      at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393)
      at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474)
      at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:324)
      at org.hibernate.integrator.internal.IntegratorServiceImpl.&lt;init&gt;(IntegratorServiceImpl.java:40)
      at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:213)
      at org.hibernate.cfg.Configuration.&lt;init&gt;(Configuration.java:119)
      at com.h.MainMethod.main(MainMethod.java:19)
  </code></pre>
  
  <p>Can anyone please help to solve this.
  Thanks in advance.</p>