Ecore 文件中的递归?
只是尝试从给定的 UML 模型转换为 Ecore 模型。之后我尝试创建一个生成器模型。
每次我尝试执行此操作时,都会收到错误消息,该日志中存在“未处理的事件循环异常”:
org.eclipse.swt.SWTException:无法执行可运行的(java.lang.NullPointerException) 在 org.eclipse.swt.SWT.error(SWT.java:3884) 在 org.eclipse.swt.SWT.error(SWT.java:3799) 在 org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137) 在 org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885) 在 org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506) 在 org.eclipse.jface.window.Window.runEventLoop(Window.java:825) 在 org.eclipse.jface.window.Window.open(Window.java:801) 在 org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction.run(DashboardMediator.java:316) 在 org.eclipse.gmf.internal.bridge.ui.dashboard.HyperlinkFigure$1.mousePressed(HyperlinkFigure.java:63) 在 org.eclipse.draw2d.Figure.handleMousePressed(Figure.java:873) 在 org.eclipse.draw2d.SWTEventDispatcher.dispatchMousePressed(SWTEventDispatcher.java:214) 在 org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:513) 在 org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179) 在 org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 在 org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) 在 org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) 在 org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) 在 org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) 在 org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) 在 org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) 在 org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) 在 org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) 在 org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) 在 org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) 在 org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) 在 org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法) 在 sun.reflect.NativeMethodAccessorImpl.invoke(来源未知) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(来源未知) 在 java.lang.reflect.Method.invoke(来源未知) 在 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) 在 org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) 在 org.eclipse.equinox.launcher.Main.run(Main.java:1311) 引起原因:java.lang.NullPointerException 在 org.eclipse.emf.converter.util.ConverterUtil.computeRequiredPackages(ConverterUtil.java:374) 在 org.eclipse.emf.converter.ui.contribution.base.ModelConverterPackagePage.validate(ModelConverterPackagePage.java:965) 在 org.eclipse.emf.importer.ui.contribution.base.ModelImporterPackagePage.validate(ModelImporterPackagePage.java:101) 在 org.eclipse.emf.converter.ui.contribution.base.ModelConverterPackagePage$1.run(ModelConverterPackagePage.java:155) 在 org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) 在 org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) ... 34 更多
此后,出现另一个异常:“无法创建编辑器 ID org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditorID:引发意外异常。”
会话数据说: eclipse.buildId=未知 java.version=1.6.0_13 java.vendor=太阳微系统公司 BootLoader 常量:OS=win32、ARCH=x86、WS=win32、NL=de_DE 框架参数:-product org.eclipse.epp.package.modeling.product 命令行参数: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.modeling.product -consoleLog
带有此长日志:
java.lang.NullPointerException 在 org.eclipse.emf.ecore.util.EcoreUtil.getURI(EcoreUtil.java:2887) 在org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.diagnose(GenModelImpl.java:2930) 在 org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.validate(GenModelEditor.java:1773) 在 org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.initialize(GenModelEditor.java:596) 在 org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.createPages(GenModelEditor.java:1080) 在 org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:357) 在 org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662) 在 org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462) 在 org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) 在 org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286) 在org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857) 在org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762) 在 org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754) 在 org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705) 在 org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) 在 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701) 在 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685) 在 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668) 在 org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard.openEditor(ModelConverterWizard.java:318) 在 org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.performFinish(ModelImporterWizard.java:167) 在 org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:752) 在 org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction$1.finishPressed(DashboardMediator.java:311) 在 org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373) 在 org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) 在 org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) 在 org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 在 org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) 在 org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) 在 org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) 在 org.eclipse.jface.window.Window.runEventLoop(Window.java:825) 在 org.eclipse.jface.window.Window.open(Window.java:801) 在 org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction.run(DashboardMediator.java:316) 在 org.eclipse.gmf.internal.bridge.ui.dashboard.HyperlinkFigure$1.mousePressed(HyperlinkFigure.java:63) 在 org.eclipse.draw2d.Figure.handleMousePressed(Figure.java:873) 在 org.eclipse.draw2d.SWTEventDispatcher.dispatchMousePressed(SWTEventDispatcher.java:214) 在 org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:513) 在 org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179) 在 org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 在 org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) 在 org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) 在 org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) 在 org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) 在 org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) 在 org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) 在 org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) 在 org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) 在 org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) 在 org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) 在 org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) 在 org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法) 在 sun.reflect.NativeMethodAccessorImpl.invoke(来源未知) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(来源未知) 在 java.lang.reflect.Method.invoke(来源未知) 在 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) 在 org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) 在 org.eclipse.equinox.launcher.Main.run(Main.java:1311)
有谁知道出了什么问题吗?我看了一会儿我的模型,但没发现什么问题。 我只是认为由于“未处理的事件循环异常”可能会出现递归,但这可能吗?
提前致谢, 多米尼克
just tried to convert towards a Ecore-Model from a given UML-Model. After this I am trying to create a Generator Model.
Everytime I try to do this I get the Error Message, that there is a "Unhandled event loop exception" with this log:
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:3884)
at org.eclipse.swt.SWT.error(SWT.java:3799)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction.run(DashboardMediator.java:316)
at org.eclipse.gmf.internal.bridge.ui.dashboard.HyperlinkFigure$1.mousePressed(HyperlinkFigure.java:63)
at org.eclipse.draw2d.Figure.handleMousePressed(Figure.java:873)
at org.eclipse.draw2d.SWTEventDispatcher.dispatchMousePressed(SWTEventDispatcher.java:214)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:513)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179)
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:3910)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
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:194)
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:368)
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:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: java.lang.NullPointerException
at org.eclipse.emf.converter.util.ConverterUtil.computeRequiredPackages(ConverterUtil.java:374)
at org.eclipse.emf.converter.ui.contribution.base.ModelConverterPackagePage.validate(ModelConverterPackagePage.java:965)
at org.eclipse.emf.importer.ui.contribution.base.ModelImporterPackagePage.validate(ModelImporterPackagePage.java:101)
at org.eclipse.emf.converter.ui.contribution.base.ModelConverterPackagePage$1.run(ModelConverterPackagePage.java:155)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
... 34 more
After this there occurs another exception with this text: "Unable to create editor ID org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditorID:An unexpected exception was thrown."
The session data says:
eclipse.buildId=unknown
java.version=1.6.0_13
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Framework arguments: -product org.eclipse.epp.package.modeling.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.modeling.product -consoleLog
With this long log:
java.lang.NullPointerException
at org.eclipse.emf.ecore.util.EcoreUtil.getURI(EcoreUtil.java:2887)
at org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.diagnose(GenModelImpl.java:2930)
at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.validate(GenModelEditor.java:1773)
at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.initialize(GenModelEditor.java:596)
at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.createPages(GenModelEditor.java:1080)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:357)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668)
at org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard.openEditor(ModelConverterWizard.java:318)
at org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.performFinish(ModelImporterWizard.java:167)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:752)
at org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction$1.finishPressed(DashboardMediator.java:311)
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:3910)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction.run(DashboardMediator.java:316)
at org.eclipse.gmf.internal.bridge.ui.dashboard.HyperlinkFigure$1.mousePressed(HyperlinkFigure.java:63)
at org.eclipse.draw2d.Figure.handleMousePressed(Figure.java:873)
at org.eclipse.draw2d.SWTEventDispatcher.dispatchMousePressed(SWTEventDispatcher.java:214)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:513)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179)
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:3910)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
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:194)
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:368)
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:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Has anyone an idea what is going wrong? I looked a while at my model but were not able to find something wrong.
I just thought there might be a recursion due to the "Unhandled event loop exception" but is this even possible?
Thanks in advance,
Dominik
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,收到错误了。
这是因为生成的数据类型不在包内。修复此问题后,一切正常。
Ok, got the error.
It was because a generated datatype was not inside a package. After fixing this, everything works fine.