Tapestry 5
  1. Tapestry 5
  2. TAP5-1905

Not serializable: org.apache.tapestry5.tree.DefaultTreeExpansionModel - can't persist sessions across cluster

    Details

      Description

      org.apache.tapestry5.tree.DefaultTreeExpansionModel is not serializable but used in a persisted field in the Tree component in tapestry-core.

      If you want to persist your sessions to the filesystem or to database (for clustering) the serialization fails. the class contains only serializable values, so this can be fixed with adding the serializable interface to the DefaultTreeExpansionModel

      as a quick fix one can extend the DefaultTreeExpansionModel and add the serializable interface and use this class with the Tree component parameter "expansionModel":

      ///////////////////

      import java.io.Serializable;

      import org.apache.tapestry5.tree.DefaultTreeExpansionModel;

      public class SerializableTreeExpansionModel<T> extends DefaultTreeExpansionModel<T> implements Serializable

      { private static final long serialVersionUID = 88777116818436263L; }

        Issue Links

          Activity

          Howard M. Lewis Ship made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Fix Version/s 5.4 [ 12316401 ]
          Resolution Fixed [ 1 ]
          Howard M. Lewis Ship made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Howard M. Lewis Ship made changes -
          Assignee Howard M. Lewis Ship [ hlship ]
          Lance made changes -
          Link This issue is related to TAP5-1908 [ TAP5-1908 ]
          Felix Gonschorek made changes -
          Field Original Value New Value
          Description org.apache.tapestry5.tree.DefaultTreeExpansionModel is not serializable but used in a persisted field in the Tree component in tapestry-core.

          If you want to persist your sessions to the filesystem or to database (for clustering) the serialization fails. the class contains only serializable values, so this can be fixed with adding the serializable interface to the DefaultTreeExpansionModel

          as a quick fix one can extend the DefaultTreeExpansionModel and add the serializable interface and use this class with the Tree component parameter "expansionModel":


          ///////////////////

          package mycreon.core.model;

          import java.io.Serializable;

          import org.apache.tapestry5.tree.DefaultTreeExpansionModel;


          public class SerializableTreeExpansionModel<T> extends DefaultTreeExpansionModel<T> implements Serializable {

              private static final long serialVersionUID = 88777116818436263L;

          }


          org.apache.tapestry5.tree.DefaultTreeExpansionModel is not serializable but used in a persisted field in the Tree component in tapestry-core.

          If you want to persist your sessions to the filesystem or to database (for clustering) the serialization fails. the class contains only serializable values, so this can be fixed with adding the serializable interface to the DefaultTreeExpansionModel

          as a quick fix one can extend the DefaultTreeExpansionModel and add the serializable interface and use this class with the Tree component parameter "expansionModel":


          ///////////////////

          import java.io.Serializable;

          import org.apache.tapestry5.tree.DefaultTreeExpansionModel;


          public class SerializableTreeExpansionModel<T> extends DefaultTreeExpansionModel<T> implements Serializable {

              private static final long serialVersionUID = 88777116818436263L;

          }


          Felix Gonschorek created issue -

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Felix Gonschorek
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development