title: java.lang.ClassNotFoundException: org.apache.commons.logging.impl.LogFactoryImpl
body: <p>I am writing a command for a maven project in Java using the 'CommandLine' class. The command will take two integer values as parameters on a command line and displays its sum. However, my project does not build and throws exception as follows:</p>
  
  <pre><code>java.lang.ClassNotFoundException: org.apache.commons.logging.impl.LogFactoryImpl
  </code></pre>
  
  <p>I did some research on the error, and I have added the following dependency to my pom.xml file</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hbase&lt;/groupId&gt;
          &lt;artifactId&gt;hbase&lt;/artifactId&gt;
          &lt;version&gt;0.94.2-cdh4.2.1&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.5&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;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.17&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
          &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
          &lt;version&gt;1.1.1&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-mr1-cdh4.2.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-common&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-cdh4.2.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-cli&lt;/groupId&gt;
          &lt;artifactId&gt;commons-cli&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;jdk.tools&lt;/groupId&gt;
          &lt;artifactId&gt;jdk.tools&lt;/artifactId&gt;
          &lt;version&gt;1.7.0_05&lt;/version&gt;
          &lt;scope&gt;system&lt;/scope&gt;
          &lt;systemPath&gt;${JAVA_HOME}/lib/tools.jar&lt;/systemPath&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>The command I run on my command prompt is as follows:</p>
  
  <pre><code>java -jar addition-examppe-0.0.1-SNAPSHOT.jar addition 1 2 -dataType Integer
  </code></pre>
  
  <p>However, I still get the same error on my console as I mentioned above. Any other work around for this particular problem ?</p>
  
  <p>Note: This command is built by me so I have written the Java classes and methods for the operation but the error is simply because of a maven dependency.</p>