File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes java.lang.OutOfMemoryError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "java.lang.OutOfMemoryError" Watch "java.lang.OutOfMemoryError" New topic


Joseph Bashir
Ranch Hand

Joined: Jun 16, 2004
Posts: 41
I have used Struts framework in my website. Most of the time I have this error:

Can someone please tell me why I am getting this error?
Michael Swierczek
Ranch Hand

Joined: Oct 07, 2005
Posts: 125

Java allocates 64MB of memory per process by default. If you're getting an OutOfMemory error, then you're exceeding it.

Check the documentation for Tomcat4 (which I think is what you're running), and see how you can boost the max allowed memory.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Another possibility is that you have some sort of recursion or infinite loop that keeps allocating objects until the JVM finally runs out of memory. I'd suggest taking a close look at your code. If you can't find the leak, you might try running it through a debugger or profiler.

Consultant, Sima Solutions
I agree. Here's the link:
subject: java.lang.OutOfMemoryError
It's not a secret anymore!