title: What's wrong with the commons-fileupload dependency?
body: <p>I'm trying to use commons-fileupload module by including its dependency in <code>pom.xml</code>. Packaging has no problem, however, when starting the web-app, it causes the "NoClassDefFound" error:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
  </code></pre>
  
  <p>Here's my pom.xml config:</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
          &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
          &lt;version&gt;1.2.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
          &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;1.3.2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Also, I included following config in applicationContext.xml:</p>
  
  <pre><code>&lt;bean id="multipartResolver"
          class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/&gt;
  </code></pre>
  
  <p>I wonder what I am doing wrong here?</p>