Re: Need Help: Cayenne Freezes

From: Elia Morling (eli..amiljen.se)
Date: Thu Jan 20 2005 - 17:58:57 EST

  • Next message: Andrus Adamchik: "Re: Need Help: Cayenne Freezes"

    > I don't understand what you did here.
    Sorry for being unclear.

    I have a class generated by cayenne: bbs

    If I do this the second print never occurs:
    System.out.println("I'm going to try to get my notes.");
    bbs.getNotesArray();
    System.out.println("This is never reached.");

    I'm not overriding readProperty.

    Elia

    ----- Original Message -----
    From: "Andrus Adamchik" <andru..bjectstyle.org>
    To: <cayenne-use..bjectstyle.org>
    Sent: Thursday, January 20, 2005 11:01 PM
    Subject: Re: Need Help: Cayenne Freezes

    > What do you mean it freezes in this method? How do you know?
    >
    >> I tried putting it in a try/catch and it returns:
    >> org.objectstyle.cayenne.Fault$ToManyFaul..c6572b
    >
    > I don't understand what you did here. It would be helpful if you post your
    > Java code with the explanation of what happens at each line... But here is
    > something you can check on your own:
    >
    > 1. A property is a Fault until "readProperty" is called, this is OK. Fault
    > is converted to a List on demand when readProperty is called for the first
    > time... So do you override "readProperty" somewhere by any chance and
    > change its behavior?
    >
    > 2. You can debug your app in Eclipse. Set a breakpoint inside
    > "getNotesArray", and start your application from Eclipse using "Debug"
    > command instead of "Run". Once you hit the breakpoint, you can get down
    > the call stack and see where it actually "freezes"... [I can't post a full
    > manual on debugging in Eclipse here. If anyone could recommend a good
    > online tutorial, please send a link]
    >
    > Andrus
    >
    >
    >
    >> I have a really wierd problem. Andrus asked me for a stack trace, but
    >> there is none. The application simply freezes. This happens in an auto
    >> cayenne generated class while retrieving a to-many array. Like this:
    >>
    >> public List getNotesArray() {
    >> return (List)readProperty("notesArray");
    >> }
    >>
    >> I tried putting it in a try/catch and it returns:
    >> org.objectstyle.cayenne.Fault$ToManyFaul..c6572b
    >>
    >> If I simply trace the object I also get:
    >> {[ date => Sun Jun 27 23:44:39 CEST 2004
    >> notesArray => org.objectstyle.cayenne.Fault$ToManyFaul..c6572b
    >> ]<oid: com.bbs: <BBS_ID: 220>; state: committed>}
    >>
    >>
    >> Any ideas?
    >>
    >> Elia
    >
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Jan 20 2005 - 17:58:59 EST