[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.uml2] Re: Export to UML from ECORE fails

Hi Heinz,

It appears that you are trying to save a Boolean primitive type that is "not 
contained in a resource".
Try setting breakpoints on the DanglingHREFException to get a better idea of 
which item is failing.
If you are still having issues, try posting a snippet of the model and a 
reproduceable scenario and I can have a look.

Cheers,
- James.


"Heinz Drews" <heinz.drews@xxxxxxxxx> wrote in message 
news:ggcb1p$sfq$1@xxxxxxxxxxxxxxxxxxxx
> Hello,
>
> I get an InvocationTargetException caused by a DanglingHREFException, the 
> full stacktrace is in this message.
>
> How can I locate the element causing the error?
>
> Regards,
> Heinz
>
>
>
> java.lang.reflect.InvocationTargetException
> at 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:119)
> at 
> org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:458)
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:366)
> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
> at 
> org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard.performFinish(ModelConverterWizard.java:246)
> at 
> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
> at 
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
> at 
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
> at org.eclipse.jface.window.Window.open(Window.java:801)
> at 
> org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(OpenWizardActionDelegate.java:115)
> at 
> org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(OpenWizardActionDelegate.java:105)
> at 
> org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDelegate.java:70)
> at 
> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
> at 
> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
> at 
> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
> at 
> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
> at 
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
> at 
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at 
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
> at 
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
> at 
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at 
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at 
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
> at 
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> 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.launcher.Main.invokeFramework(Main.java:549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> Caused by: org.eclipse.core.runtime.CoreException: An error occurred while 
> performing this operation.
> at 
> org.eclipse.emf.common.util.DiagnosticException.toCoreException(DiagnosticException.java:47)
> at 
> org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard$1.execute(ModelConverterWizard.java:235)
> at 
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:104)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
> at 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:116)
> ... 45 more
> Caused by: org.eclipse.emf.common.util.DiagnosticException: An error 
> occurred while performing this operation.
> at 
> org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard$1.execute(ModelConverterWizard.java:234)
> ... 48 more
> Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The 
> object 'org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@1c44394 
> (name: Boolean, visibility: <unset>) (isLeaf: false, isAbstract: false)' 
> is not contained in a resource.
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:306)
> at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:270)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:205)
> at 
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1344)
> at 
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:986)
> at 
> org.eclipse.uml2.uml.ecore.exporter.UMLExporter.doExport(UMLExporter.java:151)
> at org.eclipse.emf.exporter.ModelExporter.export(ModelExporter.java:634)
> at 
> org.eclipse.emf.exporter.ui.contribution.base.ModelExporterWizard.doPerformFinish(ModelExporterWizard.java:113)
> at 
> org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard$1.execute(ModelConverterWizard.java:228)
> ... 48 more
> Caused by: org.eclipse.emf.ecore.xmi.DanglingHREFException: The object 
> 'org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@1c44394 (name: 
> Boolean, visibility: <unset>) (isLeaf: false, isAbstract: false)' is not 
> contained in a resource.
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.handleDanglingHREF(XMLHelperImpl.java:760)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getURIFragment(XMLHelperImpl.java:731)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getIDREF(XMLHelperImpl.java:753)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveIDRefSingle(XMLSaveImpl.java:1954)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1300)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2667)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1156)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1017)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany(XMLSaveImpl.java:2368)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1515)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2667)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1156)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1017)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany(XMLSaveImpl.java:2368)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1515)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2667)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObject(XMLSaveImpl.java:671)
> at 
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveImpl.java:588)
> at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:256)
> ... 55 more