For the latest versions of 1.4.2 (_10 and up) and 5/6 there is a very
useful utility called jmap -
http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jmap.html
that's built into the Java SDK. This dumps out all the objects in the heap.
Doesn't work under windows though..

Joe

On 30/12/06, Thomas Fischer <[EMAIL PROTECTED]> wrote:

An out of memory error is typically very difficult to pinpoint. The place
where this error occurs is typically not connected to the place where the
problem sits. Personally, I know of two ways of dealing with this
- you can have an idea what happens. The answers before have provided
situations where OutOfMemory-Problems typically happen.
- If you think that none of the typical causes apply to you, you have to
find out the hard way. To get an idea of the cause of the problem, create
a heap dump of the virtual machine just after an OutOfMemory-Error occured
(on linux, this is done by using the "kill -3" command on the appropriate
process). Then, scan through the heap dump to see which objects occur most
often. These are usually the objects which are not dereferenced and cause
the memory overflow. Then go through the code and find out where these
objects are created, and why they are not thrown away after being used.
You might need more information out of the heap dump than just the class
names of the relevant object; there are tools showing the refences out of
heap dumps but I never used one myself.

    Hope this helps,

          Thomas

On Mon, 18 Dec 2006, jill han wrote:

> What could cause java.lang.OutOfMemoryError ?
> The application is built on turbine/torque/velocity.
>
> Thanks in advance
>
> Jill
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to