title: Why am I getting a NoClassDefFoundError on HttpServletRequest that is pointing to ServletFileUpload?
body: <p>I recently started using JMeter to load test my webapp, locally on my pc. I have a jsp page for uploading images. The images are processed by my servlet. When I tried the process today, I got the following exception/error :</p>
  
  <pre><code>exception
  
  javax.servlet.ServletException: Servlet execution threw an exception
  
  root cause
  
  java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
      org.apache.commons.fileupload.servlet.ServletFileUpload.isMultipartContent(ServletFileUpload.java:68)
      spyder.servlets.imageProcessing.ImageProcessingServlet.uploadEditedImagesToDB(ImageProcessingServlet.java:527)
      spyder.servlets.imageProcessing.ImageProcessingServlet.doPost(ImageProcessingServlet.java:153)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  </code></pre>
  
  <p>Here is the code from my servlet that the exception is referring to - </p>
  
  <pre><code>boolean isPart = ServletFileUpload.isMultipartContent(req);
  </code></pre>
  
  <p>....and yes, I've put all the necessary <code>import</code> statements in the class. </p>
  
  <p>I can't recall making any changes to anything on my system that would cause this problem. This process has always run without any problems, so I don't understand what is causing it to fail like this now. Its rather coincidental, I think, that it is failing after I've been using JMeter...</p>