Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » OutOfMemoryError during EMF model code generation from XSD source
OutOfMemoryError during EMF model code generation from XSD source [message #416697] Wed, 13 February 2008 11:39 Go to next message
Gerrit  is currently offline Gerrit Friend
Messages: 30
Registered: July 2009
Member
Hello everyone,


I am constantly getting an OutOfMemoryError (Java heap space) during EMF
model code generation from XSD sources.

Edit, editor and tests code can be generated, but when generating the
model code, EMF seems to run into an infinite loop, filling up the heap.
The progress bar shows no progress, until at some point the generation
aborts without any result. I tried allocating more memory to the JVM, but
to no avail.

This happens with more complex real-world XSDs with lots of
cross-references, like DocBook or SVG. The model code for the small sample
XSD from the library tutorial gets generated all right.

Sadly, I am new to EMF. If I am missing something important here, or if
there is more appropriate vocabulary to describe the problem, please give
me a hint.

I have found neither a matching problem report nor a solution in the
newsgroups and mailing lists. Is anyone else experiencing the same problem?


Thanks in advance!



I am using the following platform:

Ubuntu Feisty
Linux kernel version 2.6.20

Sun Java Platform, Standard Edition Development Kit 5.0

Eclipse Platform
Version: 3.3.1.1
Build id: M20071023-1652

Eclipse Modeling Framework (EMF)
Version: 2.3.1.v200709252135
Build id: 200709252135


Eclipse is started with the following parameters:
/eclipse -vmargs -Xmx2048M -XX:PermSize=512M


Here is the log entry:

!ENTRY org.eclipse.emf.codegen.ecore.ui 2 0 2008-02-12 19:44:57.787
!MESSAGE
!STACK 0
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:350)
at
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDialog.java:495)
at
org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBarContributor$GenerateAction.run(GenModelActionBarCon tributor.java:423)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:546)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Caused by: java.lang.OutOfMemoryError: Java heap space
Root exception:
java.lang.OutOfMemoryError: Java heap space
Re: OutOfMemoryError during EMF model code generation from XSD source [message #416700 is a reply to message #416697] Wed, 13 February 2008 14:13 Go to previous message
Marcelo Paternostro is currently offline Marcelo PaternostroFriend
Messages: 602
Registered: July 2009
Senior Member
Hi Gerrit,

I am not aware of people having these problems. And I personally
generate the UML2 model (which is quite big) from time to time to make
sure we are not running into those problems.

Perhaps you could attach here the schema that is causing the problem.
Also you could try to set the Java's initial heap size of using the -Xms
argument (like -Xms256M). I am no expert on these things, but I am
noticing that your Xmx is quite high. Keep in mind that the heap should
be in memory all the time so, as a rule of thumb, it should not exceed
70% of your total memory. I am sorry if I am saying things that you
already know.

Cheers,
Marcelo

Gerrit wrote:
> Hello everyone,
>
>
> I am constantly getting an OutOfMemoryError (Java heap space) during EMF
> model code generation from XSD sources.
>
> Edit, editor and tests code can be generated, but when generating the
> model code, EMF seems to run into an infinite loop, filling up the heap.
> The progress bar shows no progress, until at some point the generation
> aborts without any result. I tried allocating more memory to the JVM,
> but to no avail.
>
> This happens with more complex real-world XSDs with lots of
> cross-references, like DocBook or SVG. The model code for the small
> sample XSD from the library tutorial gets generated all right.
>
> Sadly, I am new to EMF. If I am missing something important here, or if
> there is more appropriate vocabulary to describe the problem, please
> give me a hint.
>
> I have found neither a matching problem report nor a solution in the
> newsgroups and mailing lists. Is anyone else experiencing the same problem?
>
>
> Thanks in advance!
>
>
>
> I am using the following platform:
>
> Ubuntu Feisty
> Linux kernel version 2.6.20
>
> Sun Java Platform, Standard Edition Development Kit 5.0
>
> Eclipse Platform
> Version: 3.3.1.1
> Build id: M20071023-1652
>
> Eclipse Modeling Framework (EMF) Version: 2.3.1.v200709252135
> Build id: 200709252135
>
>
> Eclipse is started with the following parameters:
> /eclipse -vmargs -Xmx2048M -XX:PermSize=512M
>
>
> Here is the log entry:
>
> !ENTRY org.eclipse.emf.codegen.ecore.ui 2 0 2008-02-12 19:44:57.787
> !MESSAGE !STACK 0
> java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:350)
> at
> org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDialog.java:495)
>
> at
> org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBarContributor$GenerateAction.run(GenModelActionBarCon tributor.java:423)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:546)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
> Caused by: java.lang.OutOfMemoryError: Java heap space
> Root exception:
> java.lang.OutOfMemoryError: Java heap space
>
>
>
>
Previous Topic:Changing EType of an EAttribute @ runtime
Next Topic:Deleting markers
Goto Forum:
  


Current Time: Fri Apr 26 00:37:42 GMT 2024

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

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

Back to the top