Thursday, 12 February 2009

junit.report fails with OutOfMemoryError

Running too many testsuites in junit.report causes a failure with the message

2009-02-11 08:33:25,664 [Thread-15] INFO ScriptRunner - junit.report:
2009-02-11 08:33:25,667 [Thread-15] INFO ScriptRunner - [mkdir] Created dir: /a01/home/Construction_temp/reports/ebilling/junit
2009-02-11 08:33:41,604 [Thread-14] WARN ScriptRunner - java.lang.OutOfMemoryError: PermGen space
2009-02-11 08:33:41,605 [Thread-14] WARN ScriptRunner - PermGen space








Resolution:

in the build.bat or build.sh, add more memory to the JVM process like so:

ANT_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m"
export ANT_OPTS=$ANT_OPTS