Details

      Description

      I am using rich:fileUpload.

      <rich:fileUpload id="import-file-uploader"
                       acceptedTypes="xml"
                       immediateUpload="true"
                       addLabel="Browse"
                       maxFilesQuantity="1"
                       listHeight="54px"
                       doneLabel="File imported."
                       clearAllLabel="Clear"
                       execute="@this"
                       fileUploadListener="#{importBean.importFile}"/>
      

      web.xml:

          <context-param>
              <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>
              <param-value>100000000</param-value>
          </context-param>
          <context-param>
              <param-name>org.richfaces.fileUpload.createTempFiles</param-name>
              <param-value>false</param-value>
          </context-param>	
      

      Java class:

      public void importFile(FileUploadEvent event) {
              LOGGER.entering(this.getClass().getName(), "fileImportListener()");
              FacesContext context = getUtility().getFacesContext();
              UploadedFile item = event.getUploadedFile();
              setUploadedFile(item);
      }
      

      When i browse a file and , select the file, progress bar completes and in logs it is throwing ViewExpiredException:

      [10/26/15 12:04:00:266 EET] 000004d5 StateUtils    E   View State cannot be reconstructed
                                       javax.faces.FacesException: javax.faces.application.ViewExpiredException
              at org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:496)
              at org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:378)
              at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(HtmlResponseStateManager.java:223)
              at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getState(HtmlResponseStateManager.java:167)
              at org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreView(DefaultFaceletsStateManagementStrategy.java:148)
              at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:391)
              at org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
              at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1482)
              at org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:278)
              at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:83)
              at org.richfaces.application.GlobalResourcesViewHandler.restoreView(GlobalResourcesViewHandler.java:179)
              at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:123)
              at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:172)
              at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:119)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
              at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:108)
      
      ....
      
      Caused by: javax.faces.application.ViewExpiredException
              at org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:489)
              ... 66 more
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rams.m Rams M
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: