ICEfaces
  1. ICEfaces
  2. ICE-7477

DataTable holds reference and saves state of non-serializable TablePanelConfig component

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta2
    • Fix Version/s: 3.0.RC1, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      To avoid the exceptions when running the example, you can set the following context parameter:


          <context-param>
              <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
              <param-value>false</param-value>
          </context-param>

      However, this is only a solution for environments where session serialization is not needed at all.
      Show
      To avoid the exceptions when running the example, you can set the following context parameter:     <context-param>         <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>         <param-value>false</param-value>     </context-param> However, this is only a solution for environments where session serialization is not needed at all.

      Description

      In testing the ACE Comp Suite application, the Data Table: Table Configuration example throws the following exception when running with MyFaces 2:

      Table Config throws java.io.NotSerializableException: org.icefaces.ace.component.tableconfigpanel.TableConfigPanel

      This will be a problem in any environment where the state gets serialized (serialized sessions in Tomcat, clusters, etc) but shows up more quickly with MyFaces because the implementation serializes the state far more frequently than Mojarra.

      The issue is that the DataTable component not only keeps a reference to the TablePanelConfig class (if one is active) but also tries to save it's state which is a bit of an unusual design.

      There are two possible solutions:

      1) Make TablePanelConfig and TablePanelConfigBase implement Serializable (which involved changing TablePanelConfigMeta to generate the proper code).

      2) Make the TablePanelConfig reference transient, and make sure it's only used as a cache for the getter method, which should fall back to searching for the component.

        Activity

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: