cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomi N/A" <>
Subject Re: OutOfMemoryError: reading a large number of objects one by one
Date Mon, 14 May 2007 21:47:09 GMT
2007/5/14, Andrus Adamchik <>:
> You may also try to reduce the "Max Number of Objects" for the
> DataDomain from the default 10000 to something smaller.
> Also are you setting "-Xmx" to something small? You may want to start
> with the higher values, if only to be able to see the effect of
> various memory saving strategies before the app crashes.

Reduced the max number of objects to 1000. The result? A NPE at:
		for (MyClassC mcc :

The database referential integrity ensures there can be no nulls if
(mcc != null), which it is.
As far as -Xmx is concerned, it's at it's default value (64M), which
should be several times more than necessary for the job.
An embarrassing side problem is that I don't know how to set it to
something greater within the NetBeans IDE when running the JUnit test
I'm running. However, that's not the main issue, is it?
I've ran into this problem before: allocating 512MB of RAM just to
calculate a report in memory is hardly justified, but that's exactly
what happens in another application I've built.

Any other thoughts?

BTW, this feels like a good moment to point out that the first reply
to my question came within 10 minutes of me sending the question, and
it wasn't the first timethat happened, either: I've never ever seen
this kind of support, free or commercial. It'd go without saying that
I appreciate it, but I'll say it anyway: thanks Andrus, thanks


View raw message