title: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
body: <p>I am trying a simple example of file upload in spring MVC using maven and I follwed this <a href="http://www.roseindia.net/tutorial/spring/spring3/web/spring-3-mvc-fileupload-example.html">tutorial</a>.</p>
  
  <p>But I am getting this error</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
  </code></pre>
  
  <p>I also included the dependencies in pom.xml</p>
  
  <pre><code>&lt;!-- Apache Commons Upload --&gt; 
  &lt;dependency&gt;
      &lt;groupId&gt;commons-io&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 in dispatcher-servlet.xml</p>
  
  <pre><code>&lt;!-- Configure the multipart resolver --&gt;
  &lt;bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"&gt;
      &lt;!-- one of the properties available; the maximum file size in bytes --&gt;
      &lt;property name="maxUploadSize" value="100000"/&gt;
  &lt;/bean&gt; 
  </code></pre>
  
  <p>So, can you help me where I am going wrong.</p>
  
  <p>Thanks in advance.</p>