0 Replies Latest reply on Aug 13, 2008 7:53 AM by shashi kumar

    richfaces file upload problem

    shashi kumar Newbie

      I am new to rich faces ...


      I have a form with following text fields ...
      ------------------------------------------------


      Name --textbox


      address -- text area


      image -- richfaces fileupload


      I have Fileupload class have a listener() method calls which if i select image .. set immediateupload to true ... i upload as soon i select the image...


      (fileupload class in session scope)


      after upload the image to I have a submit button on click of the button
      I am storing the name and address and image to database ... to tabel


      But on click of submit button i throw this exception......



      Please help to relsove this issue...
      shashi




      javax.faces.FacesException
      at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:109)
      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
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:80)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)


      -------------------------------------------------------------------------


      Caused by: java.lang.NullPointerException
      at org.richfaces.renderkit.FileUploadRendererBase.doDecode(FileUploadRendererBase.java:122)
      at org.ajax4jsf.renderkit.RendererBase.decode(RendererBase.java:76)
      at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:764)
      at javax.faces.component.UIInput.decode(UIInput.java:719)
      at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1006)
      at javax.faces.component.UIInput.processDecodes(UIInput.java:633)
      at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1001)
      at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1001)
      at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1001)
      at org.richfaces.component.UISwitchablePanel.processDecodes(UISwitchablePanel.java:165)
      at org.richfaces.component.UITabPanel.processDecodes(UITabPanel.java:146)


      -----------------------------------------------------------------------------------------