cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject OutOfMemoryErrors
Date Wed, 14 Feb 2007 14:57:20 GMT

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:

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:


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
> ( 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

View raw message