This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "java.lang.OutOfMemoryError" Watch "java.lang.OutOfMemoryError" New topic
Author

java.lang.OutOfMemoryError

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: 107
    
    1
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.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.lang.OutOfMemoryError