Maven "Stream Exception" http-bio-8080-exec-32 "java.lang.OutOfMemoryError: PermGen space"

I did a project on NetBeans under Ubuntu 11.10 with the Struts2 + Spring and Hibernate frames. The first run is fine, but when I run it a second or third time, I keep getting this exception. Without Maven, everything is going well. I installed maven with apt-get install, and yes, I added this line export MAVEN_OPTS=-Xmx512mto usr/bin/mvn, but no luck. How to get the best performance?

+5
source share
3 answers

You should add this line:

export MAVEN_OPTS="-Xmx512M -XX:MaxPermSize=512M" 

Please note that some users have reported that double quotes give problems, so you can use:

export MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=512M 

EDIT:

Since you are using Tomcat, use this:

  • tomcat/bin/catalina.sh
  • JAVA_OPTS = "- Djava.awt.headless = true -Dfile.encoding = UTF-8-server -Xms512m -Xmx1024m -XX: NewSize = 256m -XX: MaxNewSize = 256m -XX: PermSize = 256m -XX: MaxPermSize = 256m -XX: + DisableExplicitGC"
  • , Tomcat

...

+5

permgen space , . "", , , , , , . , , , , , , , ​​ . , , , , , . .

+4

-Xmx512m , . PermGen, .

Try increasing the PermGen space and place some flags to extract it. Below is more information: Duplicate "PermGen" in Tomcat 6

+3
source

All Articles