0

I am implementing a mavenized web spring MVC app. As IDE I use Netbeans and for deployment Apache Tomcat 7.0

The past four hours I keep receiving

java.lang.OutOfMemoryError: PermGen space.

What I have done to solve the issue, so far, with no luck are:

1)Restart Tomcat

2) Edit Netbeans.conf adding something like this

-J-Xms512m -J-Xmx512m -J-XX:PermSize=512m

or this

-J-Xms128m -J-Xmx128m -J-XX:PermSize=128m -J-XX:+UseConcMarkSweepGC -J-XX:+CMSPermGenSweepingEnabled -J-XX:+CMSClassUnloadingEnabled -J-XX:MaxPermSize=128m

3)In Netbeans:

Project Properties-> Actions-> Run->-Xms512m -J-Xmx512m

4)Finally, I restarted my computer.

What am I doing wrong? What else could it be? Until yesterday the web app worked pretty well. Since then, I haven't done any changes.

Any help is appreciated, I do not know how to 'un'-stuck. Thank you.

user2008973
  • 435
  • 3
  • 9
  • 22

1 Answers1

0

Its better Add this

-XX:+UseConcMarkSweepGC
-XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled
-XX:MaxPermSize=128m
  • Where should I add this? I mean in netbeans.conf or somewehere else?Actually in Netbeans->Proeperties->Actions->Runs these args are not recognized. Thanks – user2008973 Dec 02 '13 at 19:32
  • I have this "netbeans_default_options="-J-client -J-Xss2m -J-Xms128m -J-Xmx128m -J-XX:PermSize=128m -J-XX:+UseConcMarkSweepGC -J-XX:+CMSPermGenSweepingEnabled -J-XX:+CMSClassUnloadingEnabled -J-XX:MaxPermSize=128m" in my netbeans.conf but still get the permgen error. – user2008973 Dec 02 '13 at 20:21