title: Hibernate configuration troubles
body: <p>Trying hibernate &amp; doing as manuals say. But it doesn't work.</p>
  
  <pre><code>package util;
  
  //imports
  
  public class HibernateUtil {
      private static SessionFactory sessionFactory = null;
  
      static {
          try {
              System.out.println("HU 01");
              Configuration configuration = new Configuration();
              System.out.println("HU 02");
              configuration.configure();
              System.out.println("HU 03");
                  //creates the session factory from hibernate.cfg.xml
              ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();   
              System.out.println("HU 04");     
              sessionFactory = configuration.buildSessionFactory(serviceRegistry);
              System.out.println("HU 05");
          } catch (Exception e) {
              System.out.println("HU 06");
                e.printStackTrace();
          }
      }
  
      public static SessionFactory getSessionFactory() {
  
          System.out.println("HU 00");
          return sessionFactory;
      }
  }
  </code></pre>
  
  <p>I've got next logs (placed System.out... everywhere):</p>
  
  <pre><code>Main class starts.
  Factory initialised.
  Factory.Entity initialised.
  ImplDAO 1
  HU 01
  ImplDAO 8
  Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/BasicLogger
      at org.hibernate.cfg.Configuration.&lt;clinit&gt;(Configuration.java:176)
      at util.HibernateUtil.&lt;clinit&gt;(HibernateUtil.java:14)
      at dao.impl.ImplDAO.setData(ImplDAO.java:27)
      at service.MainClass.main(MainClass.java:17)
  </code></pre>
  
  <p>"HU 01" appears in console, "HU 02" doesn't. So, I think, I have got some hibernate.cfg.xml problems, but it's also made with manual:</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.OracleDriver&lt;/property&gt;
      &lt;property name="hibernate.connection.url"&gt;jdbc:oracle:thin:@localhost:1251:XE&lt;/property&gt;
      &lt;property name="hibernate.connection.username"&gt;SYSTEM&lt;/property&gt;
      &lt;property name="hibernate.connection.password"&gt;12345&lt;/property&gt;
  
      &lt;property name="hibernate.connection.pool_size"&gt;10&lt;/property&gt;
      &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/property&gt;
      &lt;property name="show_sql"&gt;true&lt;/property&gt;
      &lt;property name="hbm2ddl.auto"&gt;update&lt;/property&gt;
      &lt;property name="hibernate.connection.autocommit"&gt;false&lt;/property&gt;
      &lt;property name="current_session_context_class"&gt;thread&lt;/property&gt;
  
      &lt;mapping class="logic.EntityClass" /&gt;
  
    &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>My environement:</p>
  
  <pre><code>Hibernate 4.1
  WebLogic Server 11gR1
  Oracle DataBase 11g Express Edition
  Eclipse Juno
  JRE: jdk1.7.0_09
      (same thing with Oracle WebLogic Server 11gR1 (10.3.2) JRE)
  </code></pre>
  
  <p>AnyIdea?</p>