title: Hibernate - Log4j - Trace ERROR
body: <p>After J. Roberson kindly asked me to create a new answer because my code changed but didnt got fixed. <a href="https://stackoverflow.com/questions/39773158/hibernate-error-log4j">First code and problem</a>, I checked all answers at <a href="https://stackoverflow.com/questions/12532339/no-appenders-could-be-found-for-loggerlog4j">Thread</a>, but they didnt helped me, I stil get an error and cant use </p>
  
  <p><code>SessionFactory factory = new Configuration();</code></p>
  
  <p>Problem : </p>
  
  <pre><code>    0 [main] DEBUG org.jboss.logging  - Logging Provider: org.jboss.logging.Log4jLoggerProvider
  16 [main] DEBUG org.hibernate.integrator.internal.IntegratorServiceImpl  - Adding Integrator [org.hibernate.cfg.beanvalidation.BeanValidationIntegrator].
  21 [main] DEBUG org.hibernate.integrator.internal.IntegratorServiceImpl  - Adding Integrator [org.hibernate.secure.spi.JaccIntegrator].
  40 [main] DEBUG org.hibernate.integrator.internal.IntegratorServiceImpl  - Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
  Exception in thread "main" java.lang.NoSuchFieldError: TRACE
      at org.jboss.logging.Log4jLogger.translate(Log4jLogger.java:60)
      at org.jboss.logging.Log4jLogger.doLog(Log4jLogger.java:40)
      at org.jboss.logging.Logger.trace(Logger.java:107)
      at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.registerStrategyImplementor(StrategySelectorImpl.java:66)
      at org.hibernate.boot.registry.selector.internal.StrategySelectorBuilder.addDialect(StrategySelectorBuilder.java:237)
      at org.hibernate.boot.registry.selector.internal.StrategySelectorBuilder.addDialects(StrategySelectorBuilder.java:188)
      at org.hibernate.boot.registry.selector.internal.StrategySelectorBuilder.buildSelector(StrategySelectorBuilder.java:154)
      at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:222)
      at org.hibernate.cfg.Configuration.&lt;init&gt;(Configuration.java:118)
      at main.java.Main.main(Main.java:39)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
  </code></pre>