Re: XML Encoder/Decoder Beta

From: Kevin J. Menard, Jr. (nirvdru..egativetwenty.net)
Date: Thu Dec 09 2004 - 17:57:12 EST

  • Next message: Andrus Adamchik: "Re: XML Encoder/Decoder Beta"

    Hi Andrus,

    On Dec 6, 2004, at 3:53 PM, Andrus Adamchik wrote:

    > I guess we should actually preserve the model. This is what gives us
    > interoperability which is a good thing and I think is actually
    > protected
    > under certain laws (DMCA?).

    Sounds good.

    >
    >> 2) How worthwhile is this whole XMLCoding interface business?
    >
    > I can't comment on that - I never used it myself. I guess it is up to
    > you.

    After looking at things in more detail, XMLCoding is basically the same
    as Cayenne's XMLSerializable, so I'm just gonna use that.

    I would like to use XMLEncoder's printProperty() methods and such, but
    at the same time, I'd like to change the output format a bit. I
    assume I should just tack on new things rather than change existing
    functionality, but that's going to make for a grotesque API. Any
    thoughts here?

    Well, hopefully I'll have something together by the end of the weekend.
      Most of the core logic was in an helper class anyway, and that really
    didn't resemble anything from WebObjects, so I've been able to keep
    that. The rest is just hooking in with Cayenne at various locations.

    One thing came up when encoding one of my data objects using
    java.beans.XMLEncoder, however. Any insights as to what's going on
    would be appreciated, since it's not clear to me why there are DC
    errors, or what the "discarding statement" lines are.

    -- 
    Thanks,
    Kevin
    

    java.lang.InstantiationException: org.objectstyle.cayenne.ObjectId Continuing ... java.lang.RuntimeException: failed to evaluate: <unbound>=ObjectId.new(); Continuing ... java.lang.NullPointerException Continuing ... java.lang.Exception: discarding statement User0.setUsername("nirvdrum"); Continuing ... org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2-dev December 9 2004] Cannot set object as destination of relationship createdBy because it is in a different DataContext Continuing ... java.lang.Exception: discarding statement Category0.setCreatedBy(User0); Continuing ... java.lang.InstantiationException: org.objectstyle.cayenne.ObjectId Continuing ... java.lang.RuntimeException: failed to evaluate: <unbound>=ObjectId.new(); Continuing ... org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2-dev December 9 2004] Cannot set object as destination of relationship category because it is in a different DataContext Continuing ... java.lang.Exception: discarding statement Bookmark0.setCategory(Category0); Continuing ... org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2-dev December 9 2004] Cannot set object as destination of relationship createdBy because it is in a different DataContext Continuing ... java.lang.Exception: discarding statement Bookmark0.setCreatedBy(User0); Continuing ... java.lang.InstantiationException: org.objectstyle.cayenne.ObjectId Continuing ... java.lang.RuntimeException: failed to evaluate: <unbound>=ObjectId.new(); Continuing ... java.lang.NullPointerException Continuing ... java.lang.Exception: discarding statement Bookmark0.setTitle("Maddox"); Continuing ...



    This archive was generated by hypermail 2.0.0 : Thu Dec 09 2004 - 17:57:51 EST