[jboss-user] [JBoss Seam] - Help on s:filleupload
xigua
do-not-reply at jboss.com
Thu Mar 8 14:31:48 EST 2007
Hi,
I am trying to use the fileupload component provided by Seam 1.1.6 and it worked if I actually select a file. The issue is that, if I didn't select any file, then I am getting NPE:
| 2007-03-08 14:26:40,987 ERROR org.jboss.seam.servlet.SeamExceptionFilter [] - exception root cause
| java.lang.NullPointerException
| at java.io.FileInputStream.<init>(FileInputStream.java:103)
| at org.jboss.seam.servlet.MultipartRequest$FileParam.getInputStream(MultipartRequest.java:220)
| at org.jboss.seam.servlet.MultipartRequest.getFileInputStream(MultipartRequest.java:479)
| at org.jboss.seam.ui.FileUpload.decode(FileUpload.java:54)
| at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:606)
| at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
| at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
| at javax.faces.component.UIForm.processDecodes(UIForm.java:53)
| at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
| at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:135)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.access$001(AjaxViewRoot.java:46)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot$1.invokeRoot(AjaxViewRoot.java:247)
| at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:36)
| at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:168)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processDecodes(AjaxViewRoot.java:260)
| at org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues(LifecycleImpl.java:219)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:71)
|
I am using InputStream in the managed-bean.
Is there any way to make it work even if I didn't select any file?
Thanks,
xigua
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026391#4026391
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026391
More information about the jboss-user
mailing list