-
1. Re: Problem with rich:fileUpload
ilya_shaikovsky Jun 2, 2009 9:42 AM (in response to kash_meu)remove enctype="multipart/form-data" from the form. It is not required and should not be used with rf fileUpload.
If you will get the same check please if the same works fine without custom progress bar.
on my side your snippet works ok with 3.3.2 snapshot. -
2. Re: Problem with rich:fileUpload
kash_meu Jun 2, 2009 12:16 PM (in response to kash_meu)Thanks you very much
-
3. Re: Problem with rich:fileUpload
kash_meu Jun 2, 2009 12:23 PM (in response to kash_meu)I have another problem with the same component.
I copied the exact code from http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf and used as a demo application.
But when I run that, I get this exceptionjava.lang.NullPointerException at org.richfaces.renderkit.FileUploadRendererBase.doDecode(FileUploadRendererBase.java:140) at org.ajax4jsf.renderkit.RendererBase.decode(RendererBase.java:75) at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:761) at javax.faces.component.UIInput.decode(UIInput.java:719) at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1003) at javax.faces.component.UIInput.processDecodes(UIInput.java:633) at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:998) at javax.faces.component.UIForm.processDecodes(UIForm.java:203) at org.ajax4jsf.component.AjaxViewRoot$1.invokeContextCallback(AjaxViewRoot.java:392) at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:238) at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:409) at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:246) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 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:365) 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.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301) 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:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
What do I do to remedy this?
Regards,
Kashif -
4. Re: Problem with rich:fileUpload
nbelaevski Jun 2, 2009 2:52 PM (in response to kash_meu)Looks like misconfiguration issue. Refer to documentation on how to configure file upload + MyFaces properly.
-
5. Re: Problem with rich:fileUpload
kash_meu Jun 3, 2009 12:35 AM (in response to kash_meu)Hi,
I did the following configuration after some googling. But the exception is still there.<filter> <display-name>RichFaces Filter</display-name> <filter-name>richfaces</filter-name> <filter-class>org.ajax4jsf.Filter</filter-class> <init-param> <param-name>createTempFiles</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>maxRequestSize</param-name> <param-value>20000000</param-value> </init-param> </filter>
What do I do next. Please help.
Regards,
Kashif -
6. Re: Problem with rich:fileUpload
kash_meu Jun 3, 2009 1:59 AM (in response to kash_meu)Hello,
I have fixed the exception that was occurring. But now I am facing another problem.
byte[] fileData = item.getData();
the fileData is null.
even though System.out.println(item.getFileName()); is displaying the correct information.
What's the problem now?
Regards,
Kashif -
7. Re: Problem with rich:fileUpload
nbelaevski Jun 3, 2009 5:08 AM (in response to kash_meu)Kashif,
http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/apidoc_framework/org/richfaces/model/UploadItem.html#getData(). And in your environment createTempFiles=true.