title: java.lang.ExceptionInInitializerError in the creation of hibernate configuration
body: <p>I'm working on a Hibernate project and I configured everything.</p>
  
  <p>So, I generated the beans and hbm files.</p>
  
  <p>Then, I wrote a test class to test the project(I used the <code>Client</code> class)</p>
  
  <p>When I executed the code, the following exception was thrown:</p>
  
  <pre><code>java.lang.ExceptionInInitializerError
  Caused by: java.lang.NullPointerException
  at org.slf4j.LoggerFactory.singleImplementationSanityCheck(LoggerFactory.java:192)
  at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:113)
  at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)
  at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
  at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:255)
  at org.aness.test.HiberM.&lt;clinit&gt;(HiberM.java:12)
  Exception in thread "main" 
  </code></pre>
  
  <p>the code is : </p>
  
  <pre><code>import org.aness.beans.*;
  import org.hibernate.Session;
  import org.hibernate.SessionFactory;
  import org.hibernate.Transaction;
  import org.hibernate.cfg.Configuration;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
  public class HiberM {
   final static Logger logger = LoggerFactory.getLogger(Client.class);
  public static void main(String[]arg){
  
      Configuration cfg = new Configuration().configure();
      SessionFactory sf =cfg.buildSessionFactory();
      Session s = sf.openSession();
      Transaction tx =s.beginTransaction();
  
      Client c =new Client();
      c.setRaisonSociale("peugeot algerie");
      c.setNumeroRc("3215468897");
      c.setIdentificationFiscale("888777999");
      c.setAdresseActivite("blida zone atlas");
      c.setTelephone("00213(0)25436996");
      c.setFax("00213(0)25436996");
  
      s.save(c);
      tx.commit();
  
     }
  
   }
  </code></pre>
  
  <p>that's the whole problem.</p>
  
  <p>the hibernate cfg file 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 name="apurement"&gt;
   &lt;property name="hibernate.connection.driver_class"&gt;com.mysql.jdbc.Driver&lt;/property&gt;
   &lt;property name="hibernate.connection.password"&gt;root&lt;/property&gt;
   &lt;property name="hibernate.connection.url"&gt;jdbc:mysql://localhost/apurement&lt;/property&gt;
   &lt;property name="hibernate.connection.username"&gt;root&lt;/property&gt;
   &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/property&gt;
  &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>the client mapping is : </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;
  &lt;!-- Generated 27 d?c. 2012 11:47:54 by Hibernate Tools 3.4.0.CR1 --&gt;
  &lt;hibernate-mapping&gt;
      &lt;class name="org.aness.beans.Client" table="client" catalog="apurement"&gt;
      &lt;id name="clientId" type="int"&gt;
          &lt;column name="client_id" /&gt;
          &lt;generator class="assigned" /&gt;
      &lt;/id&gt;
      &lt;property name="raisonSociale" type="string"&gt;
          &lt;column name="raison_sociale" length="150" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;property name="numeroRc" type="string"&gt;
          &lt;column name="numero_rc" length="45" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;property name="identificationFiscale" type="string"&gt;
          &lt;column name="identification_fiscale" length="45" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;property name="adresseActivite" type="string"&gt;
          &lt;column name="adresse_activite" length="250" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;property name="adressePersonelle" type="string"&gt;
          &lt;column name="adresse_personelle" length="250" /&gt;
      &lt;/property&gt;
      &lt;property name="telephone" type="string"&gt;
          &lt;column name="telephone" length="45" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;property name="fax" type="string"&gt;
          &lt;column name="fax" length="45" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;set name="domiciliations" table="domiciliation" inverse="true" lazy="true" fetch="select"&gt;
          &lt;key&gt;
              &lt;column name="client_id" not-null="true" /&gt;
          &lt;/key&gt;
          &lt;one-to-many class="org.aness.beans.Domiciliation" /&gt;
      &lt;/set&gt;
      &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>