I have also tried
<h:form> <rich:fileUpload /> </h:form>
This gives the same error.
Figured it out. This is not strictly a RichFaces issue. I had Apache MyFaces ExtensionFilter configured in web.xml in order to use Tomahawk components. All multipart/form-data requests that are passed through ExtensionFilter get converted into a MultipartRequestWrapper, which always returns "application/x-www-form-urlencoded" as the contentType. The Ajax4Jsf BaseFilter does not recognize this as a multipart form request and, therefore, does not set the necessary session variable to parse the file upload. Since the FileUploadRendererBase requires this variable, a NullPointerException is thrown.
Also, I had to get rid of Trinidad, which I wasn't using anyway.
There is hope! Putting the ExtensionsFilter declaration (and mappings) after the RichFaces Filter declaration/mappings in web.xml seems to solve the issue.
Thanks to anyone who looked into this.
Hello. This is known issue.
You should to configure AJAX & Extension filter to be sure that AJAX filter is processing firstly.
Please look at the following issue: https://jira.jboss.org/jira/browse/RF-3096.
There example attached with correctly configured filters. It works fine with myfaces.
Look at those web.xml and keep the same filter declaration ordering and mapping.