title: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
body: <p>I am trying to get an example to work with an activiti workflow with a JUnit Test. I get the following error:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
      at org.activiti.engine.impl.test.TestHelper.&lt;clinit&gt;(TestHelper.java:53)
      at org.activiti.engine.test.ActivitiRule.initializeProcessEngine(ActivitiRule.java:237)
      at org.activiti.engine.test.ActivitiRule.starting(ActivitiRule.java:205)
      at org.activiti.engine.test.ActivitiRule.startingQuietly(ActivitiRule.java:171)
      at org.activiti.engine.test.ActivitiRule.access$000(ActivitiRule.java:86)
      at org.activiti.engine.test.ActivitiRule$1.evaluate(ActivitiRule.java:124)
      at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
  Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 22 more
  </code></pre>
  
  <p>I installed Maven and executed <code>mvn eclipse:eclipse</code> as recommended in the activiti documentation (see <a href="http://www.activiti.org/userguide/#activitiDesigner" rel="nofollow">12.2</a> in activiti user guide). Since that did not help, I tried <code>mvn eclipse:clean</code> followed by <code>mvn eclipse:eclipse</code>. But I still get the same error.</p>
  
  <p>I have the following dependencies:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
    &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
    &lt;version&gt;1.7.6&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
    &lt;artifactId&gt;slf4j-jdk14&lt;/artifactId&gt;
    &lt;version&gt;1.7.6&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Based on other threads with the same error I added the following dependencies:</p>
  
  <pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
        &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
        &lt;version&gt;1.7.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
        &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
        &lt;version&gt;1.0.13&lt;/version&gt;
     &lt;/dependency&gt;  
  </code></pre>
  
  <p>Unfortunately, none of this has changed anything in regards to this error. Can anybody tell me, what I am missing?</p>
  
  <p>Here is the entire pom.xml:</p>
  
  <pre><code>    &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;org.activiti.examples&lt;/groupId&gt;
    &lt;artifactId&gt;activiti-examples&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
    &lt;name&gt;BPMN 2.0 with Activiti - Examples&lt;/name&gt;
    &lt;properties&gt;
      &lt;activiti-version&gt;5.18.0&lt;/activiti-version&gt;
    &lt;/properties&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.activiti&lt;/groupId&gt;
        &lt;artifactId&gt;activiti-engine&lt;/artifactId&gt;
        &lt;version&gt;${activiti-version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.activiti&lt;/groupId&gt;
        &lt;artifactId&gt;activiti-spring&lt;/artifactId&gt;
        &lt;version&gt;${activiti-version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
        &lt;artifactId&gt;groovy-all&lt;/artifactId&gt;
        &lt;version&gt;2.4.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.h2database&lt;/groupId&gt;
        &lt;artifactId&gt;h2&lt;/artifactId&gt;
        &lt;version&gt;1.3.168&lt;/version&gt;
      &lt;/dependency&gt;
          &lt;dependency&gt;
        &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
        &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
        &lt;version&gt;1.7.6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
        &lt;artifactId&gt;slf4j-jdk14&lt;/artifactId&gt;
        &lt;version&gt;1.7.6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
        &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
        &lt;version&gt;1.7.5&lt;/version&gt;
      &lt;/dependency&gt;   
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;4.11&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
       &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
             &lt;version&gt;2.3.2&lt;/version&gt;
          &lt;configuration&gt;
               &lt;source&gt;1.6&lt;/source&gt;
               &lt;target&gt;1.6&lt;/target&gt;
             &lt;/configuration&gt;
           &lt;/plugin&gt;
           &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
          &lt;inherited&gt;true&lt;/inherited&gt;
          &lt;configuration&gt;
               &lt;classpathContainers&gt;
                 &lt;classpathContainer&gt;org.eclipse.jdt.USER_LIBRARY/Activiti Designer Extensions&lt;/classpathContainer&gt;
               &lt;/classpathContainers&gt;
             &lt;/configuration&gt;
           &lt;/plugin&gt;
      &lt;/plugins&gt;
       &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>