serialization issue

From: Tomi NA (hefes..mail.com)
Date: Thu May 18 2006 - 06:54:35 EDT

  • Next message: Thilko Richter: "Default domain in cayenne.xml"

    I'm writing a swing app based on the NetBeans platform. I tried to
    serialize a bean containing cayenne generated beans and got the
    following result (please excuse the lenght):

    Serializable class cayennedata.OrganizationType does not declare
    serialVersionUID field. Encountered while storing:
    [org.openide.windows.TopComponent$Replacer, advancedsearch.Testing,
    java.lang.Integer, java.lang.Number] See also
    http://www.netbeans.org/issues/show_bug.cgi?id=19915
    Serializable class cayennedata.generated._OrganizationType does not
    declare serialVersionUID field. Encountered while storing:
    [org.openide.windows.TopComponent$Replacer, advancedsearch.Testing,
    java.lang.Integer, java.lang.Number, cayennedata.OrganizationType] See
    also http://www.netbeans.org/issues/show_bug.cgi?id=19915
    Serializable class org.objectstyle.cayenne.CayenneDataObject does not
    declare serialVersionUID field. Encountered while storing:
    [org.openide.windows.TopComponent$Replacer, advancedsearch.Testing,
    java.lang.Integer, java.lang.Number, cayennedata.OrganizationType,
    cayennedata.generated._OrganizationType] See also
    http://www.netbeans.org/issues/show_bug.cgi?id=19915
    Serializable class org.objectstyle.cayenne.ObjectId does not declare
    serialVersionUID field. Encountered while storing:
    [org.openide.windows.TopComponent$Replacer, advancedsearch.Testing,
    java.lang.Integer, java.lang.Number, cayennedata.OrganizationType,
    cayennedata.generated._OrganizationType,
    org.objectstyle.cayenne.CayenneDataObject] See also
    http://www.netbeans.org/issues/show_bug.cgi?id=19915

    I have a couple of questions about this.
    First, is there any special reason the templates, the DataObject and
    the ObjectId class don't have a serialVersionUID?
    Second, is it possible at all to successfuly serialize a class
    representing a database entity? Won't the serialization algorithm get
    just about the entire database, following the bean getters?

    I'd very much appreciate a comment on the topic, as well as a prod in
    the right direction concerning cayenne DataObject serialization.
    Should I be looking at decode/encodeXML?

    t.n.a.



    This archive was generated by hypermail 2.0.0 : Thu May 18 2006 - 06:55:03 EDT