0 Replies Latest reply on Aug 10, 2011 4:15 PM by Nicolai Abruzzese

    Upgrade to seam 2.2.2.Final creates NotSerializableException on UIFileUpload$LocalUploadValue when using s:fileUpload with rich:dataTable

    Nicolai Abruzzese Newbie

      After upgrading to seam 2.2.2.Final and reviewing the https://issues.jboss.org/browse/JBSEAM-2974


      Using a s:fileUpload inside a rich:dataTable, causes my app to trigger the folowing exception:



      java.io.NotSerializableException: org.jboss.seam.ui.component.UIFileUpload$LocalUploadValue
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
           at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
           at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
           at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
           at java.util.HashMap.writeObject(HashMap.java:1018)
           at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:616)
           at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:962)
           at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
           at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
           at java.util.HashMap.writeObject(HashMap.java:1018)
           at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:616)
           at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:962)
           at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
           at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
           at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
           at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
           at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1362)
           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1170)
           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
           at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:269)
           at javax.faces.render.ResponseStateManager.writeState(ResponseStateManager.java:166)
           at org.ajax4jsf.application.AjaxStateManager.writeState(AjaxStateManager.java:296)
           at org.ajax4jsf.application.AjaxStateManager.writeState(AjaxStateManager.java:258)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:620)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
           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.BaseFilter.doFilter(BaseFilter.java:530)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           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.IdentityFilter.doFilter(IdentityFilter.java:40)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
           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.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           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:235)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:679)
      12:55:16,640 SEVERE [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /personaNuevoFiltro.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@303d33b3]




      Here is the portion of the in conflict xhtml, have to mention that before the upgrade to seam 2.2.2.Final eveything workout fine!



      <rich:column id="fotoFotografiaCol">
                          <f:facet name="header"><h:outputText value="#{m['FOTOGRAFIA']}" /></f:facet>
                          <s:decorate id="fotografiaDecorate" template="editar.xhtml">
                              <s:fileUpload id="fotografiaUpload" data="#{fotografia.fotografiaByte}" accept="gif,jpg,jpeg,png" contentType="#{fotografia.fotografiaContentType}"
                                            size="40" fileName="#{fotografia.fotografiaNombre}" required="true"/>
                          </s:decorate>
                      </rich:column>
      


      Thanks in advance for who ever takes time to help!