OOME in XMLReporter

127 views
Skip to first unread message

Adrian Mitev

unread,
Oct 19, 2010, 4:07:00 AM10/19/10
to testng...@googlegroups.com
Hi all! I get the following exception during testng ant task:

   [testng] Exception in thread "main" java.lang.OutOfMemoryError: PermGen space [testng] at java.lang.ClassLoader.defineClass1(Native Method) [testng] at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [testng] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) [testng] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) [testng] at java.net.URLClassLoader.access$000(URLClassLoader.java:56) [testng] at java.net.URLClassLoader$1.run(URLClassLoader.java:195) [testng] at java.security.AccessController.doPrivileged(Native Method) [testng] at java.net.URLClassLoader.findClass(URLClassLoader.java:188) [testng] at java.lang.ClassLoader.loadClass(ClassLoader.java:307) [testng] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) [testng] at java.lang.ClassLoader.loadClass(ClassLoader.java:252) [testng] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [testng] at org.testng.reporters.XMLReporter.writeSuiteToBuffer(XMLReporter.java:84) [testng] at org.testng.reporters.XMLReporter.writeSuite(XMLReporter.java:52) [testng] at org.testng.reporters.XMLReporter.generateReport(XMLReporter.java:29) [testng] at org.testng.TestNG.generateReports(TestNG.java:780) [testng] at org.testng.TestNG.run(TestNG.java:766) [testng] at org.testng.TestNG.privateMain(TestNG.java:914) [testng] at org.testng.TestNG.main(TestNG.java:887)
Idea how i could fix this?

--
Although nobody can come back and make a new start, anyone can start now and make a new end

Cosmin Marginean

unread,
Oct 19, 2010, 4:23:34 AM10/19/10
to testng...@googlegroups.com
This seems to be a PermGen space issue and I don't believe is related to
the actual code.
You can try increasing the permgen space for your JVM running the tests
with these settings:
-XX:PermSize=256m -XX:MaxPermSize=256m

The default is 128 MB if I remember correctly.

Let us know if you need further help

Cosmin

> --
> You received this message because you are subscribed to the Google
> Groups "testng-users" group.
> To post to this group, send email to testng...@googlegroups.com.
> To unsubscribe from this group, send email to
> testng-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/testng-users?hl=en.

André Abe Vicente

unread,
Oct 19, 2010, 6:40:46 AM10/19/10
to testng...@googlegroups.com
If you use Eclipse, this can be configured in two ways:
  1. edit Eclipse.ini passing this parameters or
  2. in JVM properties (Window >> Preferences >> Installed JREs >> Edit) - Set this in Default VM Parameters.

Adrian Mitev

unread,
Oct 19, 2010, 7:16:32 AM10/19/10
to testng...@googlegroups.com
I don't use Eclipse. I run tests through Ant.

Cosmin Marginean

unread,
Oct 19, 2010, 7:22:09 AM10/19/10
to testng...@googlegroups.com
In that case:

  • ANT_OPTS - command-line arguments that should be passed to the JVM. For example, you can define system properties or set the maximum Java heap size here.

(from here: http://ant.apache.org/manual/running.html )



Cosmin

Adrian Mitev

unread,
Oct 19, 2010, 10:30:30 AM10/19/10
to testng...@googlegroups.com
That worked. Thank you very much!
Reply all
Reply to author
Forward
0 new messages