Re: Need Help: Cayenne Freezes

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Jan 20 2005 - 17:01:03 EST

  • Next message: Gary Jarrel: "Re: Cayenne and JasperReport"

    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:01:05 EST