ICEfaces-EE
  1. ICEfaces-EE
  2. IPCK-364

Filter Table keeps references to non-serializable Field instances

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.0.0.BETA
    • Fix Version/s: EE-3.0.0.GA
    • Component/s: Facelet Components
    • Labels:
      None
    • Environment:
      MyFaces 2.1.x
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
          <context-param>
              <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
              <param-value>false</param-value>
          </context-param>
      Show
          <context-param>         <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>         <param-value>false</param-value>     </context-param>

      Description

      I see a logged exception during the initial render of the example:

      SEVERE: Exiting serializeView - Could not serialize state: java.lang.reflect.Field
      java.io.NotSerializableException: java.lang.reflect.Field
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
      ...

      Looks like we store instances of java.lang.reflect.Field in a HashMap that isn't transient:

      public class FilterTableBean extends BaseTableBean {

          private List unfilteredList;
          private Map columnFilterInput = new PutMonitoringStringHashMap();
          private Map columnFields = new HashMap();

      MyFaces shows up this type of serialization problem quite early since, by default, it serializes the View to the session. This can be turned off with a configuration parameter but it would be a problem in any serialized situations (e.g. clustering) so should be addressed.

      Other composite comps/examples that use the FilterTableBean will have the same issue.

        Activity

        Deryk Sinotte created issue -
        Hide
        Philip Breau added a comment -

        30632 2/29/12 10:28 AM 1 philip.breau IPCK-364- non-serializable Field references in FilterTableBean

        Show
        Philip Breau added a comment - 30632 2/29/12 10:28 AM 1 philip.breau IPCK-364 - non-serializable Field references in FilterTableBean
        Philip Breau made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s EE-3.0.0.GA [ 10261 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Philip Breau
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: