DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page java.lang.OutOfMemoryError on Eclipse
Notices
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2010
Default java.lang.OutOfMemoryError on Eclipse - 01-11-2010, 10:13 PM

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 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
Dha
Reply With Quote
  (#2 (permalink)) Old
Moderator
 
jwenting's Avatar
 
Posts: 125
Thanks: 0
Thanked 10 Times in 10 Posts
Join Date: Feb 2008
Send a message via MSN to jwenting
Default 01-12-2010, 12:45 AM

Contact the authors of the Flex plugin for support. It's their product causing you problems, only they can help (maybe) solve it.
2GB RAM is not a lot btw.
Reply With Quote
  (#3 (permalink)) Old
Member
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2010
Default 01-12-2010, 01:51 AM

Hey jwenting,
Thnkx for the reply... I am also working on to contact them.. thnkx
But, I feel there is something that Eclipse can do on this Just coz the root fault starting from eclipse core..
any ideas please.
thnkx
Reply With Quote
  (#4 (permalink)) Old
Member
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Aug 2008
Default 01-20-2010, 04:41 PM

No, it's clearly Flex causing this issue. Every exception generated in Eclipse will have eclipse classes at the bottom of the stack trace - it's the top of the stack trace that tells you where problems occur.
Reply With Quote
  (#5 (permalink)) Old
Member
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2010
Default 02-02-2010, 04:58 AM

Hello All,
I have just upgraded the RAM into 3GB and being used the following eclipse.ini

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

Still i am getting the above outofmemory exception and one thing i noticed is that, i am unable to increase ether of -XX:MaxPermSize or -Xmx values and if so i will be getting a Java internal error message saying "java virtual machine cant be started" while i am starting the eclipse, even though i have just increased my RAM..

Seems like i am not using the amount of RAM jst increased and bounded with the previous conditions ( with 2G ram )

Please be kind enough to share any thoughts on this..
Thankx
Dha
Reply With Quote
  (#6 (permalink)) Old
Member
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2010
Default 02-02-2010, 05:02 AM

Hello All,
I have just upgraded the RAM into 3GB and being used the following eclipse.ini

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

Still i am getting the above outofmemory exception and one thing i noticed is that, i am unable to increase ether of -XX:MaxPermSize or -Xmx values and if so i will be getting a Java internal error message saying "java virtual machine cant be started" while i am starting the eclipse, even though i have just increased my RAM..

Seems like i am not using the amount of RAM jst increased and bounded with the previous conditions ( with 2G ram )

Please be kind enough to share any thoughts on this..
Thankx
Dha
Reply With Quote
  (#7 (permalink)) Old
Member
 
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Mar 2009
Default 02-05-2010, 04:22 AM

Edit the values as below


-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-framework
plugins\org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx256m
-XX:PermSize=40m
-XX:MaxPermSize=256m
-XX:+HeapDumpOnOutOfMemoryError
-Djava.net.preferIPv4Stack=true
Reply With Quote
Reply

Tags
eclipse, java, outofmemoryerror

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java lang linkage error when using tika in Eclipse RCP application genernic Eclipse 0 05-24-2009 02:49 PM
java.lang.NoClassDefFoundError: oracle/stellent/ridc/IdcClientManager sivarayudu Eclipse 0 05-21-2009 03:31 AM
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver mhd.cst Eclipse 2 03-24-2009 05:19 AM
eclipse/vistajava.lang.NoClassDefFoundError: –Djava/library/path=//lib Exception main adhoul Eclipse 1 11-15-2008 10:52 AM
Eclipse 3.2 java.lang.OutOfMemoryError dekapx Eclipse 0 09-23-2008 12:44 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com