common reasons getting OutOfMemoryError

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

common reasons getting OutOfMemoryError

Shay Hassidim

What’s the common reasons getting OutOfMemoryError when using the xstream API?

 

My API calls are very basic:

xstream = new XStream();

xstream.registerConverter(new GregorianCalendarConverter());

xstream.registerConverter(new XmlCalendarConverter());

 

xstream.toXML(val);

….

Object valSerialized = xstream.fromXML(valXaml);

 

My usage is very basic – but I might have very large object serialized.

 

Tnx for the help.

Shay

Reply | Threaded
Open this post in threaded view
|

Re: common reasons getting OutOfMemoryError

Jörg Schaible-3
Hi Shay,

Shay Hassidim wrote:

> What's the common reasons getting OutOfMemoryError when using the xstream
> API?

None?

> My API calls are very basic:
> xstream = new XStream();
> xstream.registerConverter(new GregorianCalendarConverter());
> xstream.registerConverter(new XmlCalendarConverter());

I have no idea what custom converters do ... XmlCalendarConverter
 
> xstream.toXML(val);
> ....
> Object valSerialized = xstream.fromXML(valXaml);
>
> My usage is very basic - but I might have very large object serialized.

It builds an object graph i.e. the complete XML is turned into Java objects,
all of them kept in memory and the resulting .

Maybe you're looking for http://xstream.codehaus.org/objectstream.html ?
Some more ideas with http://xstream.codehaus.org/persistence-tutorial.html

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: common reasons getting OutOfMemoryError

Shay Hassidim
Tnx.
So how do I clear xstream cache or limit its size?
Is there a way finding our how much cache is used?

-----Original Message-----
From: Jörg Schaible [mailto:[hidden email]]
Sent: Wednesday, October 16, 2013 11:50 AM
To: [hidden email]
Subject: [xstream-user] Re: common reasons getting OutOfMemoryError

Hi Shay,

Shay Hassidim wrote:

> What's the common reasons getting OutOfMemoryError when using the
> xstream API?

None?

> My API calls are very basic:
> xstream = new XStream();
> xstream.registerConverter(new GregorianCalendarConverter());
> xstream.registerConverter(new XmlCalendarConverter());

I have no idea what custom converters do ... XmlCalendarConverter
 
> xstream.toXML(val);
> ....
> Object valSerialized = xstream.fromXML(valXaml);
>
> My usage is very basic - but I might have very large object serialized.

It builds an object graph i.e. the complete XML is turned into Java objects, all of them kept in memory and the resulting .

Maybe you're looking for http://xstream.codehaus.org/objectstream.html ?
Some more ideas with http://xstream.codehaus.org/persistence-tutorial.html

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

RE: Re: common reasons getting OutOfMemoryError

Jörg Schaible-3
Hi Shay,

Shay Hassidim wrote:

> Tnx.
> So how do I clear xstream cache or limit its size?
> Is there a way finding our how much cache is used?

None of my answers below have to do with caching ... ?!?

- Jörg

>
> -----Original Message-----
> From: Jörg Schaible [mailto:[hidden email]]
> Sent: Wednesday, October 16, 2013 11:50 AM
> To: [hidden email]
> Subject: [xstream-user] Re: common reasons getting OutOfMemoryError
>
> Hi Shay,
>
> Shay Hassidim wrote:
>
>> What's the common reasons getting OutOfMemoryError when using the
>> xstream API?
>
> None?
>
>> My API calls are very basic:
>> xstream = new XStream();
>> xstream.registerConverter(new GregorianCalendarConverter());
>> xstream.registerConverter(new XmlCalendarConverter());
>
> I have no idea what custom converters do ... XmlCalendarConverter
>  
>> xstream.toXML(val);
>> ....
>> Object valSerialized = xstream.fromXML(valXaml);
>>
>> My usage is very basic - but I might have very large object serialized.
>
> It builds an object graph i.e. the complete XML is turned into Java
> objects, all of them kept in memory and the resulting .
>
> Maybe you're looking for http://xstream.codehaus.org/objectstream.html ?
> Some more ideas with http://xstream.codehaus.org/persistence-tutorial.html
>
> Cheers,
> Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email