I am using Richfaces 3.3.1 and MyFaces 1.2. I required to add File Upload in my JSF form. I made a simple JSF form in which there was only one tag that is rich:fileupload, it was running properly and i added Listener too and the file was getting saved on the path I added. But, as soon as I try to add some other tag in the page I get an exception which I could not figure out.
java.lang.NullPointerException
at javax.faces.webapp._ErrorPageWriter.writeVariables(_ErrorPageWriter.java:329)
at javax.faces.webapp._ErrorPageWriter.writeVariables(_ErrorPageWriter.java:305)
at javax.faces.webapp._ErrorPageWriter.debugHtml(_ErrorPageWriter.java:187)
at javax.faces.webapp._ErrorPageWriter.handleThrowable(_ErrorPageWriter.java:494)
at javax.faces.webapp._ErrorPageWriter.handleException(_ErrorPageWriter.java:479)
at javax.faces.webapp.FacesServlet.handleLifecycleException(FacesServlet.java:294)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:192)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:347)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)