java.lang.OutOfMemoryError: PermGen space in tomcat with eclipse

前端 未结 3 1824
既然无缘
既然无缘 2020-12-13 06:01

i get this exception frequently when running my app on tomcat using eclipse:

java.lang.OutOfMemoryError: PermGen space
    at java.lang.ClassLoader.defineCla         


        
3条回答
  •  长情又很酷
    2020-12-13 06:40

    I got this problem today as well. It happened completely out of the blue. Yesterday I've updated JDK/JRE from 1.6.0_13 to 1.6.0_21 to fix a Glassfish 3.0.1 specific issue and Eclipse suddenly broke with those OutOfMemoryError: PermGen space errors. After (incorrectly) ranting on the Glassfish plugin and concluding that the issue wasn't fixed after cleaning the workspace metadata, it turns out that this is caused by the change of JVM vendor string from "Sun" to "Oracle" since 1.6.0_20. Eclipse didn't recognize the new JVM vendor and thus didn't apply the VM arguments as specified in eclipse.ini.

    This was reported as Eclipse issue 319514 and the Eclipse boys quickly released a patch. Until they get it fixed more permanently, the workaround is indeed to add the following lines to the eclipse.ini:

    -XX:MaxPermSize=256m
    

    So, if you recently did a JVM update, it might be worth to take a look to it.

提交回复
热议问题