1 Reply Latest reply on May 19, 2010 10:06 AM by Jason San Jose

    java.lang.OutOfMemoryError on Eclipse with Flex Plugin

    mmdsriya

      Dear All,

      I am compiling a J2EE+Flex application on eclipse ganymede Version: 3.4 with the following eclipse.ini settings. (I am working on windows7 machine with 3GB Ram)

      -showsplash
      org.eclipse.platform
      --launcher.XXMaxPermSize
      512M
      -framework
      plugins\org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
      -vmargs
      -Dosgi.requiredJavaVersion=1.5
      -Xms512m
      -Xmx768m
      -XX:PermSize=512m
      -XX:MaxPermSize=768m
      -XX:+HeapDumpOnOutOfMemoryError
      -Djava.net.preferIPv4Stack=true



      But I have continuously happened to face for the following Memory out of bounce exception during compiling the application.

      An internal error occurred during: "Building Workspace". java.lang.OutOfMemoryError


      Following is the exception trace at <workspace>/.metadeta/.log file.

      eclipse.buildId=M20080911-1700
      java.version=1.6.0_11
      java.vendor=Sun Microsystems Inc.
      BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
      Command-line arguments:  -os win32 -ws win32 -arch x86

      !ENTRY org.eclipse.core.jobs 4 2 2010-05-12 08:14:47.007
      !MESSAGE An internal error occurred during: "Building Workspace".
      !STACK 0
      java.lang.OutOfMemoryError
      at java.io.RandomAccessFile.writeBytes(Native Method)
      at java.io.RandomAccessFile.write(Unknown Source)
      at  flex2.compiler.PersistenceStore.write(PersistenceStore.java: 154)
      at flex2.compiler.API.persistCompilationUnits(API.java:4154)
      at flex2.compiler.API.persistCompilationUnits(API.java:4133)
      at flex2.tools.oem.internal.OEMUtil.save(OEMUtil.java:163)
      at flex2.tools.oem.Application.save(Application.java:506)
      at  com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.s aveState(ASBuilder.java:522)
      at  com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuild er.saveState(ASItemBuilder.java:94)
      at  com.adobe.flexbuilder.project.compiler.BuilderManager.maybeR emoveOldestBuilder(Unknown Source)
      at  com.adobe.flexbuilder.project.compiler.BuilderManager.getBui lder(Unknown Source)
      at  com.adobe.flexbuilder.project.compiler.internal.FlexIncremen talBuilder.preBuild(Unknown Source)
      at  com.adobe.flexbuilder.project.compiler.internal.FlexProjectB uilder.buildItem(Unknown Source)
      at  com.adobe.flexbuilder.project.compiler.internal.FlexProjectB uilder.build(Unknown Source)
      at  com.adobe.flexbuilder.project.compiler.internal.FlexIncremen talBuilder.build(Unknown Source)
      at  org.eclipse.core.internal.events.BuildManager$2.run(BuildMan ager.java:633)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
      at  org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:170)
      at  org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:201)
      at  org.eclipse.core.internal.events.BuildManager$1.run(BuildMan ager.java:253)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
      at  org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:256)
      at  org.eclipse.core.internal.events.BuildManager.basicBuildLoop (BuildManager.java:309)
      at  org.eclipse.core.internal.events.BuildManager.build(BuildMan ager.java:341)
      at  org.eclipse.core.internal.resources.Workspace.build(Workspac e.java:330)
      at  org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAc tion.java:182)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)



      Someone who please be kind enough to help me out to get rid of this exception, I have been working on days in finding a solution for this. What I found in every place was asking to increase the memory for JVM, as you can see I have already done it at the eclipse.ini file, but the error popping up continuously.

      Thanks a lot in  advance
      mmdsriya