Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.OutOfMemoryError

 
Joseph Bashir
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 125
1
Clojure Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic