Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Development & Programming > Programming Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Programming Talk
This forum is for all programming questions.
The questions do not have to be directly related to Ubuntu and any programming language is allowed.

 
Thread Tools Display Modes
Old August 7th, 2007   #1
yinglcs2
Way Too Much Ubuntu
 
Join Date: May 2007
Beans: 253
OutOfMemoryError: PermGen space when running eclipse 3.3 on ubuntu

hi,

I keep getting this error when I run eclipse 3.3 on ubuntu. Can anyone help?

$ Exception in thread "Tomcat Ping Thread" java.lang.OutOfMemoryError: PermGen space
at sun.net.www.protocol.http.HttpURLConnection.<init> (HttpURLConnection.java:225)
at sun.net.http://www.protocol.http.Handler.ope...andler.java:44)
at sun.net.http://www.protocol.http.Handler.ope...andler.java:39)
at java.net.URL.openConnection(URL.java:945)
at org.eclipse.jst.server.tomcat.core.internal.PingTh read.ping(PingThread.java:86)
at org.eclipse.jst.server.tomcat.core.internal.PingTh read$1.run(PingThread.java:53)
Exception in thread "org.eclipse.jdt.debug: JDI Event Dispatcher" java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :620)
at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.defineClass(DefaultClassLoader.java:161)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManag er.defineClass(ClasspathManager.java:501)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManag er.findClassImpl(ClasspathManager.java:471)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManag er.findLocalClassImpl(ClasspathManager.java:430)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManag er.findLocalClass(ClasspathManager.java:413)
at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.findLocalClass(DefaultClassLoader.java:189)
at org.eclipse.osgi.framework.internal.core.BundleLoa der.findLocalClass(BundleLoader.java:340)
at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClassInternal(BundleLoader.java:40
at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClass(BundleLoader.java:369)
at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
at org.eclipse.jdi.internal.event.EventQueueImpl.remo ve(EventQueueImpl.java:65)
at org.eclipse.jdt.internal.debug.core.EventDispatche r.run(EventDispatcher.java:226)
at java.lang.Thread.run(Thread.java:619)
java.lang.OutOfMemoryError: PermGen space
Exception in thread "Server Termination Thread" java.lang.OutOfMemoryError: PermGen space
Error while logging event loop exception:
java.lang.OutOfMemoryError: PermGen space
Logging exception:
java.lang.OutOfMemoryError: PermGen space
yinglcs2 is offline   Reply With Quote
Old August 7th, 2007   #2
nitro_n2o
Dipped in Ubuntu
 
nitro_n2o's Avatar
 
Join Date: Oct 2006
Beans: 594
Ubuntu 7.04 Feisty Fawn
Re: OutOfMemoryError: PermGen space when running eclipse 3.3 on ubuntu

probably you'll need to increase the Java heap space here is how
http://hausheer.osola.com/docs/5 if the problem persists then it's something wrong with your installation maybe
__________________
Registered Linux user # 0x6D9B1
nitro_n2o is offline   Reply With Quote
Old August 8th, 2007   #3
edwardTheGreat
5 Cups of Ubuntu
 
edwardTheGreat's Avatar
 
Join Date: May 2007
Location: Australia
Beans: 44
Ubuntu 9.04 Jaunty Jackalope
Re: OutOfMemoryError: PermGen space when running eclipse 3.3 on ubuntu

Quote:
Originally Posted by nitro_n2o View Post
probably you'll need to increase the Java heap space here is how
http://hausheer.osola.com/docs/5 if the problem persists then it's something wrong with your installation maybe
Thats Right, it looks like your PermSize is running out of room.

I haven't done this on my ubuntu setup as yet, but I think this might be how to fix it
Go to where you set up your JAVA_HOME for example:

Code:
gedit ~/.bashrc
add
Code:
export JAVA_OPTS=-Xms128m -Xmx128m -XX:MaxPermSize=128m
Increasing the MaxPermSize should fix this error.

See here for more info
http://www.unixville.com/~moazam/sto...erallHeap.html

Let us know if that helped...
edwardTheGreat is offline   Reply With Quote
Old August 10th, 2007   #4
tenmillionmilesaway
Just Give Me the Beans!
 
Join Date: Aug 2006
Beans: 72
Ubuntu 7.10 Gutsy Gibbon
Re: OutOfMemoryError: PermGen space when running eclipse 3.3 on ubuntu

If you navigate to the directory where eclipse is installed (where the eclipse executable is) you will find a file called eclipse.ini You should put the -XX:MaxPermSize option in here (along with any other vm options that you want to use when for running eclipse).
I don't know exactly what the PermGen space is but it is not the same as the heap size which is governed by the options -Xms -Xmx options. see this page for more information: http://wiki.eclipse.org/FAQ_How_do_I..._to_Eclipse%3F

I have also read that sometimes on linux the eclipse.ini file is not read correctly, with someone else suggesting that each option in the file needs to be on a new line. I'm not sure how you could test to make sure the eclipse.ini is read, but it should be.

It is also be possible to pass these options in manually by launching eclipse from the command line and adding the -vmargs stuff on the command line too: eg
Code:
eclipse -vmargs -Xms256m -Xmx512m -XX:MaxPermSize=128m
The PermGen problem tends to occur (afaik) when you have lots of plugins installed, this is why many eclipse users have multiple versions of eclipse with the minimum number of plugins that they need for the particular project.

Hope this helps
tenmillionmilesaway is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:36 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry