3 Replies Latest reply on Jan 12, 2010 3:26 AM by Sebastien V.

    java.lang.OutOfMemoryError on Eclipse with FlexBuilder plugin

    dhammikas

      Dear All,

       

      I am compiling a J2EE+Flex application on eclipse ganymede Version: 3.4.1 with the following eclipse.ini settings. (I am working on windows7 machine with 2GB 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
      -Xms1024m
      -Xmx1024m
      -XX:PermSize=512m
      -XX:MaxPermSize=512m
      -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-01-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(PersistenceS tore.java: 154)
      at flex2.compiler.API.persistCompilationUnits(API.jav a:4154)
      at flex2.compiler.API.persistCompilationUnits(API.jav a: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.A SBuilder.s aveState(ASBuilder.java:522)
      at com.adobe.flexbuilder.multisdk.compiler.internal.A SItemBuild er.saveState(ASItemBuilder.java:94)
      at com.adobe.flexbuilder.project.compiler.BuilderMana ger.maybeR emoveOldestBuilder(Unknown Source)
      at com.adobe.flexbuilder.project.compiler.BuilderMana ger.getBui lder(Unknown Source)
      at com.adobe.flexbuilder.project.compiler.internal.Fl exIncremen talBuilder.preBuild(Unknown Source)
      at com.adobe.flexbuilder.project.compiler.internal.Fl exProjectB uilder.buildItem(Unknown Source)
      at com.adobe.flexbuilder.project.compiler.internal.Fl exProjectB uilder.build(Unknown Source)
      at com.adobe.flexbuilder.project.compiler.internal.Fl exIncremen talBuilder.build(Unknown Source)
      at org.eclipse.core.internal.events.BuildManager$2.ru n(BuildMan ager.java:633)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:37)
      at org.eclipse.core.internal.events.BuildManager.basi cBuild(Bui ldManager.java:170)
      at org.eclipse.core.internal.events.BuildManager.basi cBuild(Bui ldManager.java:201)
      at org.eclipse.core.internal.events.BuildManager$1.ru n(BuildMan ager.java:253)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:37)
      at org.eclipse.core.internal.events.BuildManager.basi cBuild(Bui ldManager.java:256)
      at org.eclipse.core.internal.events.BuildManager.basi cBuildLoop (BuildManager.java:309)
      at org.eclipse.core.internal.events.BuildManager.buil d(BuildMan ager.java:341)
      at org.eclipse.core.internal.resources.Workspace.buil d(Workspac e.java:330)
      at org.eclipse.ui.actions.GlobalBuildAction$1.run(Glo balBuildAc tion.java:182)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:55)

       


      Someone please be kind enough to help me out to get rid of this exception, Sounds like the exception fired from the Flex compiler. 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
      Dhammika