Q:

Getting 'Cannot set header. Response already committed' with primefaces fileupload

i am using jsf 2 (javax.faces-2.0.10.jar) and primefaces 3.5 on websphere 8.5.0.1 and i am also using the file upload jars:

commons-fileupload-1.3.1.jar
commons-io-2.4.jar

and i am trying to use primefaces fileupload component as follows:
<h:form  id="frm" enctype="multipart/form-data">
        <p:fileUpload id="fileUpload" value="#{uploadDocument.file}"
        fileUploadListener="#{uploadDocument.handleFileUpload}" mode="advanced" dragDropSupport="false"  
                   sizeLimit="10000000" fileLimit="3"  /> 
        </h:form>

web.xml config:
<filter>
       <filter-name>PrimeFaces FileUpload Filter</filter-name>
       <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
       <init-param>
            <param-name>uploadDirectory</param-name>
            <param-value>C:/uploadFolder</param-value>
       </init-param>
    </filter>

    <filter-mapping>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>

    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>

after choosing the file and clicking upload, the file is not uploaded and i am getting following warning in log file:
com.ibm.ws.webcontainer.srt.SRTServletResponse addHeader SRVE8094W: WARNING: Cannot set header. Response already committed.

please advise why the file upload is not working ?

A:

The issue was because i had a jar called appbase.jar on my classpath when i removed it everything worked fine.

