6 Replies Latest reply on Feb 23, 2011 4:39 PM by Nick Belaevski

    Richfaces 4 M6 rich:fileUpload fails with Glassfish 3.1 RC2

    alex2011 Newbie

      I'm attemping to upload one file through rich:fileUpload and after I click upload it fails with an exception logged on the server.  I'm using Glassfish 3.1 RC2.  I experienced the same problem with M5.  If it's relevant, I have partial state saving disabled.

       

      My web.xml configuration for jsf/richfaces is as follows:

       

       

          <context-param>
              <param-name>facelets.DEVELOPMENT</param-name>
              <param-value>true</param-value>
          </context-param>    
          <context-param>
              <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
              <param-value>false</param-value>
          </context-param>
          <context-param>
              <param-name>org.richfaces.fileUpload.createTempFile</param-name>
              <param-value>true</param-value>
          </context-param>
          <context-param>
              <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>
              <param-value>50000000</param-value>
          </context-param>
      
      

       

      The stacktrace:

       

      SEVERE: java.lang.IllegalStateException: java.lang.InstantiationException: org.richfaces.view.facelets.FileUploadHandler$1$1$1
              at javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:153)
              at javax.faces.component.AttachedObjectListHolder.restoreState(AttachedObjectListHolder.java:157)
              at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1560)
              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1336)
              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1351)
              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1351)
              at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1351)
              at javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:879)
              at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:208)
              at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
              at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:452)
              at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
              at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:303)
              at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:303)
              at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:189)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
              at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:113)
              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
              at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
              at com.test.servlet.ZoneFilter.doFilter(ZoneFilter.java:51)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
              at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
              at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
              at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
              at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
              at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
              at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
              at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
              at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
              at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
              at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
              at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
              at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
              at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
              at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
              at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.InstantiationException: org.richfaces.view.facelets.FileUploadHandler$1$1$1
              at java.lang.Class.newInstance0(Class.java:340)
              at java.lang.Class.newInstance(Class.java:308)
              at javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:150)
              ... 48 more