2

My eclipse configuration.

Eclipse : latest version (Kepler)

My eclipse config.ini

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20130521-0416
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40M
-Xmx512M

After Updation From to Juno to Kepler.But with the same configuration I did'nt face any issue.

Exception I'm facing is

Caused by: java.lang.OutOfMemoryError: PermGen space
    at sun.misc.Unsafe.defineClass(Native Method)
    at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
    at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)
    at sun.reflect.MethodAccessorGenerator.generateMethod(MethodAccessorGenerator.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:28)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at net.sf.beanlib.provider.BeanPopulator.invokeMethodAsPrivileged(BeanPopulator.java:221)
    at net.sf.beanlib.provider.BeanPopulator.doit(BeanPopulator.java:194)
    at net.sf.beanlib.provider.BeanPopulator.processSetterMethod(BeanPopulator.java:172)
    at net.sf.beanlib.provider.BeanPopulator.populate(BeanPopulator.java:270)
    at net.sf.beanlib.provider.replicator.ReplicatorTemplate.populateBean(ReplicatorTemplate.java:174)
    at net.sf.beanlib.provider.replicator.BeanReplicator.replicateBean(BeanReplicator.java:173)
    at net.sf.beanlib.hibernate3.Hibernate3JavaBeanReplicator.replicateBean(Hibernate3JavaBeanReplicator.java:71)
    at net.sf.beanlib.provider.replicator.ReplicatorTemplate.replicateByBeanReplicatable(ReplicatorTemplate.java:125)
    at net.sf.beanlib.provider.replicator.ReplicatorTemplate.replicate(ReplicatorTemplate.java:120)
    at net.sf.beanlib.provider.replicator.ReplicatorTemplate.replicate(ReplicatorTemplate.java:67)
    at net.sf.beanlib.hibernate3.Hibernate3CollectionReplicator.replicate(Hibernate3CollectionReplicator.java:143)
    at net.sf.beanlib.provider.replicator.CollectionReplicator.replicateCollection(CollectionReplicator.java:88)
    at net.sf.beanlib.hibernate3.Hibernate3CollectionReplicator.replicateCollection(Hibernate3CollectionReplicator.java:79)
    at net.sf.beanlib.provider.replicator.ReplicatorTemplate.replicate(ReplicatorTemplate.java:101)
    at net.sf.beanlib.provider.BeanTransformer.transform(BeanTransformer.java:224)
    at net.sf.beanlib.provider.BeanPopulator.doit(BeanPopulator.java:201)
    at net.sf.beanlib.provider.BeanPopulator.processSetterMethod(BeanPopulator.java:172)
    at net.sf.beanlib.provider.BeanPopulator.populate(BeanPopulator.java:270)
    at net.sf.beanlib.provider.replicator.ReplicatorTemplate.populateBean(ReplicatorTemplate.java:174)
    at net.sf.beanlib.provider.replicator.BeanReplicator.replicateBean(BeanReplicator.java:173)
    at net.sf.beanlib.hibernate3.Hibernate3JavaBeanReplicator.replicateBean(Hibernate3JavaBeanReplicator.java:71)
    at net.sf.beanlib.provider.replicator.ReplicatorTemplate.replicateByBeanReplicatable(ReplicatorTemplate.java:125)
    at net.sf.beanlib.provider.replicator.ReplicatorTemplate.replicate(ReplicatorTemplate.java:120)
      [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)

It's keep telling me

[ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)

Here is my VM args

enter image description here

What could be the issue..

Thanks for any help.

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
Suresh Atta
  • 120,458
  • 37
  • 198
  • 307
  • Whilst this dealt with Tomcat, not Eclipse, it might be helpful: http://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error?answertab=votes#tab-top – Andrew Martin Aug 20 '13 at 09:36
  • @AndrewMartin Where does tomcat came in between? I'm not using tomcat. – Suresh Atta Aug 20 '13 at 09:37
  • 1
    It's the same process. See here: http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_size_available_to_Eclipse%3F – Andrew Martin Aug 20 '13 at 09:38
  • **Look [here][1] for the ways to avoid PermGen.** [1]: http://stackoverflow.com/questions/7878306/avoid-permgen-space-error-when-running-tomcat-from-eclipse – Dileep Aug 20 '13 at 09:55
  • vmargs and -XX are both useful, but in different way. Look http://stackoverflow.com/a/10814631/715269 – Gangnus Apr 05 '16 at 11:27

3 Answers3

11

From Eclipse wiki-

Why am I getting a java.lang.OutOfMemoryError: PermGen space?

The default maximum Permanent Generation space set by your JRE may be too small. This is unrelated to the maximum allowed Heap space. You can increase the maximum PermGen size by launching Eclipse with the VM argument: -XX:MaxPermSize=128m

Andrew Martin
  • 5,619
  • 10
  • 54
  • 92
1

Increase -vmargs to 512 & 1024 in eclipse.ini & close the eclipse & open it again.

Hopefully it will solve the issue.

0

This problem might also be due to there being too many apps in the launch list when you Run As ... Run on Server in eclipse.

To find out of this is the cause of the problem, you can just click Next to see the list of apps that will be launched, instead of rushing through to click Finish.

If you see other apps besides the one you want to launch, just remove all the unwanted apps so that only your app is selected, and then click Finish. This will require much less memory and thus not require you to jack up the PermGen space.

CodeMed
  • 9,527
  • 70
  • 212
  • 364