Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Converting .ecore to .genmodel (EMF/GMF)
Converting .ecore to .genmodel (EMF/GMF) [message #70990] Thu, 08 February 2007 12:15 Go to next message
Eclipse UserFriend
Originally posted by: elisabeth.olsen.bbvisuals.no

Hi,

I'm using Eclipse 3.3.0, EMF 2.3.0 and GMF 1.1.0.

By using EMF i would like to generate a GMF project. I have some problems
getting things started, which I did not encounter in the previous releases.

I have created an .ecore model, and want to generate an .genmodel based on
that. When I try to generate the new model using EMF, I get the error shown
below.
Does anybody have an idea of what the problem might be?

Thank you!

Elisabeth

---------------------------
java.lang.NullPointerException
at
org.eclipse.emf.importer.ModelImporter.adjustEPackage(ModelI mporter.java:584)
at
org.eclipse.emf.importer.ModelImporter.adjustEPackages(Model Importer.java:573)
at
org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.refreshModel(ModelImporterDetailPage.java:407)
at
org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage$3.execute(ModelImporterDetailPage.java:351)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:101)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1743)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:113)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 890)
at
org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.refreshModel(ModelImporterDetailPage.java:374)
at
org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.browseWorkspace(ModelImporterDetailPage.java:331)
at
org.eclipse.emf.converter.ui.contribution.base.ModelConverte rURIPage.doHandleEvent(ModelConverterURIPage.java:183)
at
org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.doHandleEvent(ModelImporterDetailPage.java:182)
at
org.eclipse.emf.converter.ui.contribution.base.ModelConverte rPage.handleEvent(ModelConverterPage.java:145)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3465)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3079)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:182)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
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:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3465)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3079)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1945)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1909)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:425)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hod(EclipseAppContainer.java:522)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:147)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:104)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:74)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:354)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:170)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:339 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:283)
at org.eclipse.core.launcher.Main.run(Main.java:984)
at org.eclipse.core.launcher.Main.main(Main.java:959)

-------------------------------
Re: Converting .ecore to .genmodel (EMF/GMF) [message #71033 is a reply to message #70990] Thu, 08 February 2007 12:23 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Elisabeth,

With a recent EMF 2.3 build (one after M4) we've provided validation
support for Ecore model constraints. So I would suggest right clicking
on the root EPackage of your .ecore and invoking validate. Likely you
have an EPackage without an nsURI. With this weeks build,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=172654 will ensure that
this validation is invoked as you import the .ecore in the wizard. If
this scenario involves reconciling an old .genmodel, try to open the old
..genmodel in the Generator, which will also tell you about any problems
in your Ecore model.


Elisabeth wrote:
> Hi,
>
> I'm using Eclipse 3.3.0, EMF 2.3.0 and GMF 1.1.0.
>
> By using EMF i would like to generate a GMF project. I have some problems
> getting things started, which I did not encounter in the previous releases.
>
> I have created an .ecore model, and want to generate an .genmodel based on
> that. When I try to generate the new model using EMF, I get the error shown
> below.
> Does anybody have an idea of what the problem might be?
>
> Thank you!
>
> Elisabeth
>
> ---------------------------
> java.lang.NullPointerException
> at
> org.eclipse.emf.importer.ModelImporter.adjustEPackage(ModelI mporter.java:584)
> at
> org.eclipse.emf.importer.ModelImporter.adjustEPackages(Model Importer.java:573)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.refreshModel(ModelImporterDetailPage.java:407)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage$3.execute(ModelImporterDetailPage.java:351)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:101)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1743)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:113)
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:369)
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 890)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.refreshModel(ModelImporterDetailPage.java:374)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.browseWorkspace(ModelImporterDetailPage.java:331)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rURIPage.doHandleEvent(ModelConverterURIPage.java:183)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.doHandleEvent(ModelImporterDetailPage.java:182)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rPage.handleEvent(ModelConverterPage.java:145)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3465)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3079)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
> at org.eclipse.jface.window.Window.open(Window.java:796)
> at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:182)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
> 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:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3465)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3079)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1945)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1909)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:425)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hod(EclipseAppContainer.java:522)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:147)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:104)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:74)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:354)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:170)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:339 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:283)
> at org.eclipse.core.launcher.Main.run(Main.java:984)
> at org.eclipse.core.launcher.Main.main(Main.java:959)
>
> -------------------------------
>
>
>
Re: Converting .ecore to .genmodel (EMF/GMF) [message #602364 is a reply to message #70990] Thu, 08 February 2007 12:23 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31548
Registered: July 2009
Senior Member
Elisabeth,

With a recent EMF 2.3 build (one after M4) we've provided validation
support for Ecore model constraints. So I would suggest right clicking
on the root EPackage of your .ecore and invoking validate. Likely you
have an EPackage without an nsURI. With this weeks build,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=172654 will ensure that
this validation is invoked as you import the .ecore in the wizard. If
this scenario involves reconciling an old .genmodel, try to open the old
..genmodel in the Generator, which will also tell you about any problems
in your Ecore model.


Elisabeth wrote:
> Hi,
>
> I'm using Eclipse 3.3.0, EMF 2.3.0 and GMF 1.1.0.
>
> By using EMF i would like to generate a GMF project. I have some problems
> getting things started, which I did not encounter in the previous releases.
>
> I have created an .ecore model, and want to generate an .genmodel based on
> that. When I try to generate the new model using EMF, I get the error shown
> below.
> Does anybody have an idea of what the problem might be?
>
> Thank you!
>
> Elisabeth
>
> ---------------------------
> java.lang.NullPointerException
> at
> org.eclipse.emf.importer.ModelImporter.adjustEPackage(ModelI mporter.java:584)
> at
> org.eclipse.emf.importer.ModelImporter.adjustEPackages(Model Importer.java:573)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.refreshModel(ModelImporterDetailPage.java:407)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage$3.execute(ModelImporterDetailPage.java:351)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:101)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1743)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:113)
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:369)
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 890)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.refreshModel(ModelImporterDetailPage.java:374)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.browseWorkspace(ModelImporterDetailPage.java:331)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rURIPage.doHandleEvent(ModelConverterURIPage.java:183)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterD etailPage.doHandleEvent(ModelImporterDetailPage.java:182)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rPage.handleEvent(ModelConverterPage.java:145)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3465)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3079)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
> at org.eclipse.jface.window.Window.open(Window.java:796)
> at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:182)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
> 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:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3465)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3079)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1945)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1909)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:425)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hod(EclipseAppContainer.java:522)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:147)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:104)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:74)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:354)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:170)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:339 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:283)
> at org.eclipse.core.launcher.Main.run(Main.java:984)
> at org.eclipse.core.launcher.Main.main(Main.java:959)
>
> -------------------------------
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Converting .ecore to .genmodel (EMF/GMF)
Next Topic:Teneo: Identity (ID) scope conflicts
Goto Forum:
  


Current Time: Mon Oct 26 08:13:39 GMT 2020

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

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

Back to the top