Getting java.lang.OutOfMemoryError: PermGen space despite of adding jvm memory arguments

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Getting java.lang.OutOfMemoryError: PermGen space despite of adding jvm memory arguments

JP11
This post has NOT been accepted by the mailing list yet.
Hi,

I am executing a test in fitnesse and getting the following exception:

__EXCEPTION__:java.lang.OutOfMemoryError: PermGen space
        at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_71]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_71]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_71]
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) [rt.jar:1.7.0_71]
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71) [rt.jar:1.7.0_71]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361) [rt.jar:1.7.0_71]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [rt.jar:1.7.0_71]
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_71]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [rt.jar:1.7.0_71]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425) [rt.jar:1.7.0_71]
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) [rt.jar:1.7.0_71]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [rt.jar:1.7.0_71]
        at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_71]
        at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_71]


While i try to load the class there are around 1400 classes in the jar. The issue must be due to the large number. When I run the same code in eclipse via my test file the executions completes successfully.

I am using the following command to start fitnesse:

java -Xms512m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=1024m -jar fitnesse-standalone.jar -p %FITNESSE_PORT% -d %FITNESSE_DIR% -r %FITNESSE_ROOT% -l %FITNESSE_LOG_DIR%

I have been working with fitnesse dedicatedly for 10 months now and have never come accross this issue.
Loading...