title: java.lang.NoClassDefFoundError: org/apache/log4j/Level - slf4j?
body: <p>I am trying to deploy my application, but it gives me an error:
  Failed to instantiate SLF4J LoggerFactory
  Reported exception:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/apache/log4j/Level
      at org.slf4j.impl.StaticLoggerBinder.&lt;init&gt;(StaticLoggerBinder.java:75)
      at org.slf4j.impl.StaticLoggerBinder.&lt;clinit&gt;(StaticLoggerBinder.java:45)
      at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
      at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
      at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
      at org.hibernate.cfg.Configuration.&lt;clinit&gt;(Configuration.java:197)
      at org.hibernate.ejb.Ejb3Configuration.&lt;clinit&gt;(Ejb3Configuration.java:133)
      at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)
      at weblogic.persistence.BasePersistenceUnitInfo.initializeEntityManagerFactory(BasePersistenceUnitInfo.java:452)
      at weblogic.persistence.BasePersistenceUnitInfo.initializeEntityManagerFactory(BasePersistenceUnitInfo.java:445)
      at weblogic.persistence.BasePersistenceUnitInfo.init(BasePersistenceUnitInfo.java:119)
      at weblogic.persistence.BaseJPAIntegrationProvider.createPersistenceUnitInfo(BaseJPAIntegrationProvider.java:53)
      at weblogic.persistence.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:420)
      at weblogic.persistence.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:339)
      at weblogic.persistence.ModulePersistenceUnitRegistry.&lt;init&gt;(ModulePersistenceUnitRegistry.java:67)
      at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistry(EJBModule.java:190)
      at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:297)
      at weblogic.persistence.PersistenceUnitRegistryInitializer.setupPersistenceUnitRegistries(PersistenceUnitRegistryInitializer.java:62)
      at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:394)
      at weblogic.application.internal.ExtensibleModuleWrapper$PrepareStateChange.next(ExtensibleModuleWrapper.java:295)
      at weblogic.application.internal.ExtensibleModuleWrapper$PrepareStateChange.next(ExtensibleModuleWrapper.java:285)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:109)
      at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
      at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:172)
      at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:167)
      at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:80)
      at weblogic.work.ContextWrap.run(ContextWrap.java:40)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:550)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
  </code></pre>
  
  <p>I have the jar-s in the Maven Dependences:</p>
  
  <p><img src="https://i.stack.imgur.com/QMUWm.png" alt="maven dependences"></p>
  
  <p>The classpath for the log4j jar in weblogic:</p>
  
  <p><img src="https://i.stack.imgur.com/JPwjN.png" alt="log4j.xml"></p>
  
  <p>The log4j.xml (from classpath):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt;
  
  &lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"&gt;
  
      &lt;appender name="LOGFILE" class="org.apache.log4j.FileAppender"&gt;
  
          &lt;param name="File"   value="C:\\Work\\KEPLER\\KH_RRM\\log/rrm-web.log" /&gt;
          &lt;param name="Append" value="false" /&gt;
          &lt;layout class="org.apache.log4j.PatternLayout"&gt;
             &lt;param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p [%c{1}] %m%n"/&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  
      &lt;appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"&gt;
          &lt;layout class="org.apache.log4j.PatternLayout"&gt;
             &lt;param name="ConversionPattern" value=" %d{yyyy-MM-dd HH:mm:ss} [%t] %-5p [%c{1}] %m%n"/&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  
      &lt;root&gt;
         &lt;priority value ="ALL" /&gt;
         &lt;appender-ref ref="STDOUT" /&gt;
         &lt;appender-ref ref="LOGFILE" /&gt;
      &lt;/root&gt;
  
  &lt;/log4j:configuration&gt;
  </code></pre>
  
  <p>What do I wrong? I can't imagine... Please help me! Thanks!</p>