Results 1 to 4 of 4

Thread: java.lang.OutOfMemoryError: PermGen space

  1. #1
    Join Date
    Jun 2007
    Posts
    3

    Question java.lang.OutOfMemoryError: PermGen space

    I use springide from 2.0 beta, and frequently caught java.lang.OutOfMemoryError: PermGen space
    Exception, and then my eclipse crashed.
    I use Eclipse 3.2.2,and have updated to the latest springide 2.0 release version,but the Exception still occured frequently.

    In eclipse's workspace directory, I found the following message in the .log file:

    !ENTRY org.eclipse.ui 4 0 2007-06-29 15:03:04.906
    !MESSAGE PermGen space
    !STACK 0
    java.lang.OutOfMemoryError: PermGen space
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    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:334)
    at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClass(BundleLoader.java:386)
    at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClass(BundleLoader.java:347)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.loadClass(DefaultClassLoader.java:83)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at org.eclipse.jdt.ui.CodeStyleConfiguration.createIm portRewrite(CodeStyleConfiguration.java:50)
    at org.eclipse.jdt.internal.corext.codemanipulation.S tubUtility.createImportRewrite(StubUtility.java:10 12)
    at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOp erationAction.addImports(ClipboardOperationAction. java:498)
    at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOp erationAction.doPasteWithImportsOperation(Clipboar dOperationAction.java:483)
    at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOp erationAction.internalDoOperation(ClipboardOperati onAction.java:277)
    at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOp erationAction$1.run(ClipboardOperationAction.java: 248)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(Bus yIndicator.java:67)
    at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOp erationAction.run(ClipboardOperationAction.java:24 6)
    at org.eclipse.jface.action.Action.runWithEvent(Actio n.java:499)
    at org.eclipse.ui.commands.ActionHandler.execute(Acti onHandler.java:185)
    at org.eclipse.ui.internal.handlers.LegacyHandlerWrap per.execute(LegacyHandlerWrapper.java:109)
    at org.eclipse.core.commands.Command.executeWithCheck s(Command.java:461)
    at org.eclipse.core.commands.ParameterizedCommand.exe cuteWithChecks(ParameterizedCommand.java:424)
    at org.eclipse.ui.internal.handlers.HandlerService.ex ecuteCommand(HandlerService.java:160)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.exe cuteCommand(WorkbenchKeyboard.java:466)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.pre ss(WorkbenchKeyboard.java:799)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.pro cessKeyEvent(WorkbenchKeyboard.java:846)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.fil terKeySequenceBindings(WorkbenchKeyboard.java:564)

    It seems it was caused by springide, and in fact, after closing the springide plugin, it worked well again.

    Does anyone have the same problem?

  2. #2
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    Hi,

    the PermGen space problem is actually not that much of a problem. It is indeed caused by Spring IDE or - more precisely - by the AOP support tools. This is due to the high number of class instances that are created during pointcut matching.

    You can simply work around this by increasing the size of the permanent generation space in your eclipse.ini:
    Code:
    -XX:PermSize=128m 
    -XX:MaxPermSize=128m
    Note that you don't necessarily need to increase the heap size.

    HTH

    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  3. #3
    Join Date
    Jun 2007
    Posts
    3

    Default

    Thank you, I will try it again.

  4. #4
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •