1 Reply Latest reply on Jun 3, 2008 1:29 PM by Stephen More

    Problem using fileUpload and <distributable />

    Stephen More Newbie

      I have deployed the original richfaces-demo-3.2.1.GA-tomcat6.war and the fileUpload works.

      If I change WEB-INF/web.xml to include < distributable /> then redeploy, I get the following stack trace:

      javax.faces.FacesException: java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
       at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1582)
       at org.richfaces.renderkit.FileUploadRendererBase.initMaxFilesCount(FileUploadRendererBase.java:131)
       at org.richfaces.renderkit.html.FileUploadRenderer.doEncodeEnd(FileUploadRenderer.java:206)
       at org.richfaces.renderkit.html.FileUploadRenderer.doEncodeEnd(FileUploadRenderer.java:374)
       at org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:135)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:850)
       at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:242)
       at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:178)
       at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:126)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
       at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:286)
       at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:281)
       at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
       at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
       at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
       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:233)
       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:102)
       at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
       at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
       at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
       at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1293)
       at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1254)
       at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
       at com.sun.faces.context.SessionMap.put(ExternalContextImpl.java:984)
       at com.sun.faces.mgbean.BeanManager$ScopeManager$SessionScopeHandler.handle(BeanManager.java:443)
       at com.sun.faces.mgbean.BeanManager$ScopeManager.pushToScope(BeanManager.java:418)
       at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:370)
       at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
       at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:88)
       at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
       at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
       at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61)
       at org.apache.el.parser.AstValue.getValue(AstValue.java:103)
       at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
       at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
       at org.richfaces.component.html.HtmlFileUpload.getMaxFilesQuantity(HtmlFileUpload.java:1213)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1574)
       ... 52 more



      Should I add this to JIRA as a bug ?