I made a project in NetBeans under Ubuntu 11.10 with Struts2 + Spring and Hibernate frameworks. The first run is ok, but when I run it for the second or third time I keep getting this exception. Without Maven all goes well. I installed maven with apt-get install
, and yes I added this line export MAVEN_OPTS=-Xmx512m
in usr/bin/mvn
, but without luck. How to get a better performance from it?
You should add this line:
export MAVEN_OPTS="-Xmx512M -XX:MaxPermSize=512M"
Note that some users have reported that the double quotes give problems, hence you might want to use:
export MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=512M
EDIT:
Since you are using Tomcat, use this: