1

When I try to add a library (in this case: iText-2.0.8.jar) to my java web app (JSF) and restart Tomcat, everything seems fine. The login page also renders. When I login however, the application almost immediately throws the infamous java.lang.OutOfMemoryError: PermGen space error.

Increasing the PermGen size with -XX:MaxPermGen=128M doesn't solve the issue, not even with large amounts such as 2048m. When I remove the added jar, everything's fine again.

Does anyone have an idea how to diagnose this problem?

phlogratos
  • 13,234
  • 1
  • 32
  • 37
Stijn.V
  • 617
  • 2
  • 9
  • 23

2 Answers2

1

I recently had almost exactly the same issue running XWiki on Jetty using java 6 on Windows 2000 server 64 bit.

Adding the following 2 command line switches solved it for me:

  • -XX:+CMSClassUnloadingEnabled
  • -XX:+CMSPermGenSweepingEnabled

Sorry the above didn't help.
Try this -XX:MaxPermSize=128M instead of -XX:MaxPermGen=128M

crowne
  • 8,456
  • 3
  • 35
  • 50
1

After sifting through this thread, I read this blog post.

I just switched to the JRockit JVM, and so far I haven't encountered any java.lang.OutOfMemoryError: PermGen space errors.

As a bonus, my web application now also runs faster.

Community
  • 1
  • 1
Stijn.V
  • 617
  • 2
  • 9
  • 23