8 Replies Latest reply on Apr 21, 2011 8:22 AM by Abdulkerim İnanmış

    Client side state saving fails on <rich:dataTable> containing <h:inputText> or <h:inputTextarea>

    Paweł Ryszawa Newbie

      Hi!

       

      I found an issue:

       

       

      <rich:dataTable value="someBean.someList" var="someElement">

        ...

       

        <rich:column>

          <h:inputText value="anyValue or EL" />

        </rich:column>

        ...

      </rich:dataTable>

       

      fails when javax.faces.STATE_SAVING_METHOD=client in web.xml with the following exception:

       

       

      java.io.NotSerializableException: org.richfaces.component.SavedState

              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)

              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)

              at java.util.HashMap.writeObject(HashMap.java:1001)

              at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)

              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)

              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)

              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)

              at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)

              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)

              at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)

              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)

              at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)

              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)

              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)

              at java.util.HashMap.writeObject(HashMap.java:1001)

              at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)

              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)

              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)

              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)

              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)

              at com.sun.faces.renderkit.ClientSideStateHelper.doWriteState(ClientSideStateHelper.java:293)

              at com.sun.faces.renderkit.ClientSideStateHelper.writeState(ClientSideStateHelper.java:167)

              at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:123)

              at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:155)

              at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:221)

              at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:397)

              at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)

              at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)

              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)

              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)

              at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)

              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)

              at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)

              at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)

              at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)

              at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)

              at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)

              at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)

              at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)

              at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)

              at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)

              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)

              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)

              at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)

              at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)

              at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)

              at com.sun.grizzly.ContextTask.run(ContextTask.java:69)

              at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)

              at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)

              at java.lang.Thread.run(Thread.java:619)

       

      which does not seem strange, since org.richfaces.component.SavedState does not implement Serializable interface. What is strange is that the framework tries to serialize this.

       

      Anyway, <h:dataTable> works fine - i.e.

       

      <h:dataTable value="someBean.someList" var="someElement">

        ...

       

        <h:column>

          <h:inputText value="anyValue or EL" />

        </h:column>

        ...

      </h:dataTable>

       

      works fine.

       

       

      Regards,