Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMap
EMap [message #431097] Fri, 26 June 2009 17:44 Go to next message
jagadish suri is currently offline jagadish suriFriend
Messages: 1
Registered: July 2009
Junior Member
hi,

i am having problem the way EMap is used in the modelling. My requirement
is as follows

/**
* @model
*/
EMap getEmployeeDetails();

In the EMap the key should be employeeid (BigInteger). Value should be
Employee Object which is an EObject. I have a problem as to how i should
be giving the annotations for specifying the key and value types.

Thanks
Re: EMap [message #431098 is a reply to message #431097] Fri, 26 June 2009 18:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30686
Registered: July 2009
Senior Member
Jagadish,

You can use keyType and valueType to specify those things.

jagadish suri wrote:
> hi,
>
> i am having problem the way EMap is used in the modelling. My
> requirement is as follows
>
> /**
> * @model
> */
> EMap getEmployeeDetails();
>
> In the EMap the key should be employeeid (BigInteger). Value should be
> Employee Object which is an EObject. I have a problem as to how i
> should be giving the annotations for specifying the key and value types.
>
> Thanks
>
>
Re: EMap [message #431107 is a reply to message #431098] Mon, 29 June 2009 11:40 Go to previous messageGo to next message
jagadish suri is currently offline jagadish suriFriend
Messages: 15
Registered: July 2009
Junior Member
Hi,
Thanks for the reply. when i used the annotation and tried to reload the
genmodel from the annotated java it is giving the following exceptions.
---------------------------------------------
java.lang.reflect.InvocationTargetException
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:116)
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: 934)
at
org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard.performFinish(ModelConverterWizard.java:246)
at
org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.performFinish(ModelImporterWizard.java:157)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:742)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:373)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:616)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
at org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(Op enWizardActionDelegate.java:115)
at
org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(Op enWizardActionDelegate.java:105)
at
org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:70)
at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:246)
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:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
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:153)
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: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Caused by: org.eclipse.core.runtime.CoreException: An error occurred while
performing this operation.
at
org.eclipse.emf.common.util.DiagnosticException.toCoreExcept ion(DiagnosticException.java:47)
at
org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:235)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:101)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1797)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:113)
... 46 more
------------------------------------------------------------ ---
and there is a child exceptions under the above exception which is
mentioned below.
------------------------------------------------------------ ---
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object
'org.eclipse.emf.ecore.impl.EClassImpl@1fde6fb (name:
EStringToEStringMapEntry) (instanceClassName: java.util.Map$Entry)
(abstract: false, interface: false)' is not contained in a resource.
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveIm pl.java:303)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:267)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLRes ourceImpl.java:205)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:1253)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfC hangedWithMemoryBuffer(ResourceImpl.java:1083)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:956)
at
org.eclipse.emf.importer.ModelImporter.saveGenModelAndEPacka ges(ModelImporter.java:770)
at
org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:150)
at
org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:101)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1797)
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: 934)
at
org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard.performFinish(ModelConverterWizard.java:246)
at
org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.performFinish(ModelImporterWizard.java:157)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:742)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:373)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:616)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
at org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(Op enWizardActionDelegate.java:115)
at
org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(Op enWizardActionDelegate.java:105)
at
org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:70)
at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:246)
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:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
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:153)
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: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Caused by: org.eclipse.emf.ecore.xmi.DanglingHREFException: The object
'org.eclipse.emf.ecore.impl.EClassImpl@1fde6fb (name:
EStringToEStringMapEntry) (instanceClassName: java.util.Map$Entry)
(abstract: false, interface: false)' is not contained in a resource.
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.handleDanglingH REF(XMLHelperImpl.java:759)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getHREF(XMLHelp erImpl.java:793)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveEObjectSingle (XMLSaveImpl.java:1796)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1240)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2590)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1105)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:986)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2291)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1464)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2590)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1105)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:986)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2291)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1464)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2590)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObject(XM LSaveImpl.java:653)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveI mpl.java:581)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:253)
... 56 more
Re: EMap [message #431108 is a reply to message #431107] Mon, 29 June 2009 12:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30686
Registered: July 2009
Senior Member
Jagadish,

What exactly did you try and which version of EMF are you using?


jagadish suri wrote:
> Hi,
> Thanks for the reply. when i used the annotation and tried to reload
> the genmodel from the annotated java it is giving the following
> exceptions.
> ---------------------------------------------
> java.lang.reflect.InvocationTargetException
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:116)
>
> 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: 934)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard.performFinish(ModelConverterWizard.java:246)
>
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.performFinish(ModelImporterWizard.java:157)
>
> at
> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:742)
>
> at
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:373)
>
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:616)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:227)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
> at org.eclipse.jface.window.Window.open(Window.java:796)
> at
> org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(Op enWizardActionDelegate.java:115)
>
> at
> org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(Op enWizardActionDelegate.java:105)
>
> at
> org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:70)
>
> at
> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:246)
> 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:938)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
> 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:153)
>
> 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: 504)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
> Caused by: org.eclipse.core.runtime.CoreException: An error occurred
> while performing this operation.
> at
> org.eclipse.emf.common.util.DiagnosticException.toCoreExcept ion(DiagnosticException.java:47)
>
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:235)
>
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:101)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1797)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:113)
>
> ... 46 more
> ------------------------------------------------------------ ---
> and there is a child exceptions under the above exception which is
> mentioned below.
> ------------------------------------------------------------ ---
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object
> 'org.eclipse.emf.ecore.impl.EClassImpl@1fde6fb (name:
> EStringToEStringMapEntry) (instanceClassName: java.util.Map$Entry)
> (abstract: false, interface: false)' is not contained in a resource.
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveIm pl.java:303)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:267)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLRes ourceImpl.java:205)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:1253)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfC hangedWithMemoryBuffer(ResourceImpl.java:1083)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:956)
>
> at
> org.eclipse.emf.importer.ModelImporter.saveGenModelAndEPacka ges(ModelImporter.java:770)
>
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:150)
>
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:101)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1797)
> 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: 934)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard.performFinish(ModelConverterWizard.java:246)
>
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.performFinish(ModelImporterWizard.java:157)
>
> at
> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:742)
>
> at
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:373)
>
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:616)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:227)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
> at org.eclipse.jface.window.Window.open(Window.java:796)
> at
> org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(Op enWizardActionDelegate.java:115)
>
> at
> org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(Op enWizardActionDelegate.java:105)
>
> at
> org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:70)
>
> at
> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:246)
> 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:938)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
> 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:153)
>
> 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: 504)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
> Caused by: org.eclipse.emf.ecore.xmi.DanglingHREFException: The object
> 'org.eclipse.emf.ecore.impl.EClassImpl@1fde6fb (name:
> EStringToEStringMapEntry) (instanceClassName: java.util.Map$Entry)
> (abstract: false, interface: false)' is not contained in a resource.
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.handleDanglingH REF(XMLHelperImpl.java:759)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getHREF(XMLHelp erImpl.java:793)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveEObjectSingle (XMLSaveImpl.java:1796)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1240)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2590)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1105)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:986)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2291)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1464)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2590)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1105)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:986)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2291)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1464)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2590)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObject(XM LSaveImpl.java:653)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveI mpl.java:581)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:253)
> ... 56 more
>
>
Re: EMap [message #431112 is a reply to message #431108] Mon, 29 June 2009 14:03 Go to previous messageGo to next message
jagadish suri is currently offline jagadish suriFriend
Messages: 15
Registered: July 2009
Junior Member
Hi,

This is the annotation that i used and the eclipse i am using is 3.3 and
emf-sdo-xsd-SDK-2.3.0.

/**
* @model keyType="java.lang.String" valueType="java.lang.String"
*/
Map<String, String> getScoScoMap();

When i reload the model from the annotated java then i am having the
exception mentioned in the previous message.
Re: EMap [message #431113 is a reply to message #431112] Mon, 29 June 2009 14:33 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30686
Registered: July 2009
Senior Member
Jagadish,

The issue sounds familiar. I suggest using something more recent, like
2.5 or 2.4.


jagadish suri wrote:
> Hi,
>
> This is the annotation that i used and the eclipse i am using is 3.3
> and emf-sdo-xsd-SDK-2.3.0.
>
> /**
> * @model keyType="java.lang.String" valueType="java.lang.String" */
> Map<String, String> getScoScoMap();
>
> When i reload the model from the annotated java then i am having the
> exception mentioned in the previous message.
>
Previous Topic:obtain ecore form of an instance model
Next Topic:Enum modelisation in ecore
Goto Forum:
  


Current Time: Mon Dec 09 03:27:13 GMT 2019

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

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

Back to the top