Re: OutOfMemoryErrors

From: Frank (farocc..otmail.com)
Date: Wed Feb 14 2007 - 10:03:32 EST

  • Next message: Andrus Adamchik: "Re: AS400 mapping error"

    ok, thanks you

    Frank
    ----- Original Message -----
    From: "Andrus Adamchik" <andru..bjectstyle.org>
    To: <use..ayenne.apache.org>
    Sent: Wednesday, February 14, 2007 9:57 AM
    Subject: OutOfMemoryErrors

    > Frank,
    >
    > thanks for confirming the fix. Also please send a message with a
    > different subject whenever you start a new topic (I changed the reply
    > subject to reflect the changing topic).
    >
    > Now, OutOfMemoryErrors... There are two ways to address them:
    >
    > 1. increase the available heap size:
    >
    > http://www.objectstyle.org/cayenne/lists/cayenne-user/2005/10/0098.html
    >
    > 2. use less memory. i.e. check how many objects your queries return.
    > If it is in the tens or hundreds of thousands you may need to think
    > of redesigning your app or use result iterator, or paginated queries,
    > whichever is more appropriate in your case:
    >
    > http://cayenne.apache.org/doc/iterating-through-data-rows.html
    > http://cayenne.apache.org/doc/paginated-queries.html
    >
    > Andrus
    >
    >
    > On Feb 14, 2007, at 9:34 AM, Frank wrote:
    >> Hi Andrus,
    >>
    >> I regenerated the code and eclipse does not complain about source
    >> errors.
    >> I am still having problems, but since I am new to Cayenne, it just
    >> may be a coding issue:
    >> When I attempt to retrieve some records, I get this error:
    >>
    >> javax.servlet.ServletException: Servlet execution threw an exception
    >> net.sf.click.extras.cayenne.DataContextFilter.doFilter
    >> (DataContextFilter.java:125)java.lang.OutOfMemoryError: Java heap
    >> spaceHere is my code:private List filterEmployees(String lname,
    >> String fname) { DataContext context =
    >> DataContext.getThreadDataContext(); Expression qualifier1
    >> =ExpressionFactory.likeIgnoreCaseExp(Bsypemp.EMYFNM_PROPERTY,fname
    >> +"%"); Expression qualifier2
    >> =ExpressionFactory.likeIgnoreCaseExp(Bsypemp.EMYLNM_PROPERTY,lname
    >> +"%"); SelectQuery query = new SelectQuery
    >> (Bsypemp.class,qualifier2); List records = context.performQuery
    >> (query); return records; }ThanksFrank
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Feb 14 2007 - 10:04:07 EST