|
The Object is simple.
It is working fine for 50, 100 objects... But When I have 600 objects I got the out of memory error.
I have tested in 3 different computers with 256Mb (ram),
starting java with -Xmx256m
query = new QueryByCriteria(NomePrestador.class, crit); iter = broker.getIteratorByQuery(query);
<class-descriptor class="com.maximas.sinret.data.NomePrestador" table="NomePrestador" > <field-descriptor name="id" column="id" jdbc-type="INTEGER" primarykey="true" autoincrement="true" /> <field-descriptor name="nome" column="nome" jdbc-type="VARCHAR" /> <field-descriptor name="id_empresa" column="id_empresa" jdbc-type="INTEGER" /> </class-descriptor>
-------Mensagem original-------
Data: 02/20/04 04:15:22
Assunto: Re: Out of memory error
Hi,
Glauber Andrade wrote:
> My system doesn't work anymore. I got this error when I try to get the
> object Prestador (+- 600 registers).
> What should I do ?
>
Without knowing more about your system this is hard to answer.
If there are no problems with your repository.xml it could be that you
simply should start your server with more heap memory.
But if there are problems in the mapping, this won't help.
So you should start by checking your repository.
what can be problematic? Loading 1 root object with 600 dependend
objects shoul not be a problem (we are loading 10000 objects and more in
our testcases).
But if the registers objects have references to objects, and those
objects to yet another layer of objects, you are in trouble as OJB must
load a very large Object graph in one go.
The solution can be to set proxy="true" for those reference- and
collection-descriptors. In that way you avoid loading in one go and
defer the loading of dependend objects.
Thomas
>
> [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException
> during the execution of the query (for a
> com.maximas.sinret.data.Prestador): Memory allocation failure, message
> from server: "Out of memory. Restart daemon and try again (needed 65528
> bytes)"
> Memory allocation failure, message from server: "Out of memory. Restart
> daemon and try again (needed 65528 bytes)"
> java.sql.SQLException: Memory allocation failure, message from server:
> "Out of memory. Restart daemon and try again (needed 65528 bytes)"
>
>
>
> ____________________________________________________
> - *O mundo do correio eletr�nico finalmente desenvolveu-se* - *_Clique
---------------------------------------------------------------------
|