title: Deploying PrimeFaces app to GlassFish4 causes java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItem
body: <p>I'd like to use <code>&lt;p:calendar&gt;</code> in my JSF app developed in Netbeans, so I added the PrimeFaces library. However, when I deploy the app, it errors as follows:</p>
  
  <pre><code>Context with name [/ManagedBeansWithComponents] has not yet been started
  C:\Users\Dell-pc\Documents\NetBeansProjects\ManagedBeansWithComponents\nbproject\build-   impl.xml:1040: The module has not been deployed.
  See the server log for details.
  BUILD FAILED (total time: 1 second)
  </code></pre>
  
  <p>And the server log says:</p>
  
  <pre><code>Source Document: jar:file:/C:/Users/Dell-pc/Documents/NetBeansProjects/ManagedBeansWithComponents/build/web/WEB-INF/lib/primefaces-3.5.jar!/META-INF/faces-config.xml
  Cause: Class 'org.primefaces.component.fileupload.FileUploadRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItem
  </code></pre>
  
  <p>How is this caused and how can I solve it?</p>