Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space [message #641111] Wed, 24 November 2010 10:02 Go to next message
yirco  is currently offline yirco
Messages: 14
Registered: October 2010
Junior Member
Hello,

I checked out Papyrus using the PSF. If I run the plugins as Eclipse application in another window, after some time I get an exception below. This repeats every time I start the plugins. Other details about my Eclipse and Java follow.

Any advice?

Thank you.

Eclipse Modeling Tools

Version: Helios Service Release 1
Build id: 20100917-0705

eclipse.ini
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:MaxPermSize=512m

Windows > Preferences > Plug-in Development > Target Platform > Arguments > VM Arguments
-Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m -XX:MaxPermSize=512m

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

java.lang.OutOfMemoryError: PermGen space
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
	at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:466)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)



Re: java.lang.OutOfMemoryError: PermGen space [message #641235 is a reply to message #641111] Wed, 24 November 2010 15:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26141
Registered: July 2009
Senior Member
Yirco,

You'll see hundreds of posts on the platform and newcomers newsgroups
about permgen errors. You'll need to try increase the size in the ini.


yirco wrote:
> Hello,
>
> I checked out Papyrus using the PSF. If I run the plugins as Eclipse
> application in another window, after some time I get an exception
> below. This repeats every time I start the plugins. Other details
> about my Eclipse and Java follow.
> Any advice?
>
> Thank you.
>
> Eclipse Modeling Tools
>
> Version: Helios Service Release 1
> Build id: 20100917-0705
>
> eclipse.ini
> --launcher.XXMaxPermSize
> 512M
> -showsplash
> org.eclipse.platform
> --launcher.XXMaxPermSize
> 512m
> --launcher.defaultAction
> openFile
> -vmargs
> -Dosgi.requiredJavaVersion=1.5
> -Xms40m
> -Xmx512m
> -XX:MaxPermSize=512m
>
> Windows > Preferences > Plug-in Development > Target Platform >
> Arguments > VM Arguments
> -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m -XX:MaxPermSize=512m
>
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
> Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
>
>
> java.lang.OutOfMemoryError: PermGen space
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:188)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:580)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:550)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:481)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:469)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:449)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:188)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:580)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:550)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:481)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:469)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:449)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
>
> at
> org.eclipse.osgi.internal.loader.SingleSourcePackage.loadCla ss(SingleSourcePackage.java:33)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:466)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
>
>
>
>
>
Re: java.lang.OutOfMemoryError: PermGen space [message #641243 is a reply to message #641235] Wed, 24 November 2010 15:53 Go to previous messageGo to next message
yirco  is currently offline yirco
Messages: 14
Registered: October 2010
Junior Member
Ed, thanks for your reply.

That's what I have done but the maximum suggested was -XX:MaxPermSize=512m even by experienced users.

So I was curious what MaxPermSize other people working with Papyrus use.
Re: java.lang.OutOfMemoryError: PermGen space - SOLVED [message #641376 is a reply to message #641243] Thu, 25 November 2010 09:06 Go to previous messageGo to next message
yirco  is currently offline yirco
Messages: 14
Registered: October 2010
Junior Member
It has nothing to do with eclipse.ini

The problem is in run configuration. When a plugin is started the VM arguments are taken from the target platform configuration:

Window > Preferences > Plug-in Development > Target Platform > Edit > Arguments > VM arguments

A new configuration is created with the target platform VM arguments:

Run > Run Configurations > Eclipse Application > Arguments.

The problem is if the Eclipse Application run configuration already exists, the VM arguments of the plugin target platform are not copied and the plugin runs with the VM arguments in the run configuration. Therefore increasing -XX:MaxPermSize= in the Plug-in Development target platform has no effect. It's necessary to update the run configuration or delete it.



Re: java.lang.OutOfMemoryError: PermGen space - SOLVED [message #641609 is a reply to message #641376] Fri, 26 November 2010 09:45 Go to previous messageGo to next message
Remi Schnekenburger is currently offline Remi Schnekenburger
Messages: 127
Registered: July 2009
Senior Member
Hi Yirco,

for your information, I use 512M for MaxPermSize argument, I only have a few memory exceptions, depending on which set of features I have already installed.

Thanks Ed for your reply!
Regards
Rémi


Re: java.lang.OutOfMemoryError: PermGen space - SOLVED [message #641614 is a reply to message #641609] Fri, 26 November 2010 10:33 Go to previous message
yirco  is currently offline yirco
Messages: 14
Registered: October 2010
Junior Member
Thanks Rémi, with 512m no memory problems so far.
Previous Topic:Papyrus i18n with PDE Tools
Next Topic:Saving diagram figures by means of the API
Goto Forum:
  


Current Time: Sat Oct 25 16:11:13 GMT 2014

Powered by FUDForum. Page generated in 0.10595 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software