Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » exception when creating genmodel (Juno)
exception when creating genmodel (Juno) [message #895742] Sun, 15 July 2012 15:23 Go to next message
Joel Greenyer is currently offline Joel GreenyerFriend
Messages: 170
Registered: July 2009
Senior Member
Hi,
I've recently moved to Juno (EMF 2.8.0.v20120606-0717, UML 4.0.0.v20120604-0919) and came across a strange behavior.

If I reload or re-generate some of my genmodels, I get the following exception when I hit "Finish" in the genmodel wizard. As far as I can see, this only happens if the models reference the UML metamodel. Any idea what might be causing this?
(The genmodel looks fine if I ignore this)

Joel

java.lang.reflect.InvocationTargetException
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:121)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1028)
at org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard.performFinish(ModelConverterWizard.java:240)
at org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.performFinish(ModelImporterWizard.java:170)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:259)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:279)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:229)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:210)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:492)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
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:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
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:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: org.eclipse.core.runtime.CoreException: An error occurred while performing this operation.
at org.eclipse.emf.common.util.DiagnosticException.toCoreException(DiagnosticException.java:41)
at org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard$1.execute(ModelConverterWizard.java:229)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
... 58 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:228)
... 61 more
Caused by: java.io.IOException: PUT failed with HTTP response code 405
at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl$1.close(URIHandlerImpl.java:123)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfChangedWithMemoryBuffer(ResourceImpl.java:1228)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:972)
at org.eclipse.emf.importer.ModelImporter.saveGenModelAndEPackages(ModelImporter.java:763)
at org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.doPerformFinish(ModelImporterWizard.java:157)
at org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard$1.execute(ModelConverterWizard.java:222)
... 61 more
Re: exception when creating genmodel (Juno) [message #895749 is a reply to message #895742] Sun, 15 July 2012 17:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Joel,

I think this is the same as
https://bugs.eclipse.org/bugs/show_bug.cgi?id=382637


On 15/07/2012 5:23 PM, Joel Greenyer wrote:
> Hi,
> I've recently moved to Juno (EMF 2.8.0.v20120606-0717, UML
> 4.0.0.v20120604-0919) and came across a strange behavior.
>
> If I reload or re-generate some of my genmodels, I get the following
> exception when I hit "Finish" in the genmodel wizard. As far as I can
> see, this only happens if the models reference the UML metamodel. Any
> idea what might be causing this?
> (The genmodel looks fine if I ignore this)
>
> Joel
>
> java.lang.reflect.InvocationTargetException
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:121)
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
> at
> org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1028)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard.performFinish(ModelConverterWizard.java:240)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.performFinish(ModelImporterWizard.java:170)
> at
> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
> at
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
> at org.eclipse.jface.window.Window.open(Window.java:801)
> at
> org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:259)
> at
> org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:279)
> at
> org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
> at
> org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
> at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:229)
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:210)
> at
> org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
> at
> org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:492)
> at
> org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
> 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:1053)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> 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:353)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
> 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:629)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
> Caused by: org.eclipse.core.runtime.CoreException: An error occurred
> while performing this operation.
> at
> org.eclipse.emf.common.util.DiagnosticException.toCoreException(DiagnosticException.java:41)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard$1.execute(ModelConverterWizard.java:229)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
> ... 58 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:228)
> ... 61 more
> Caused by: java.io.IOException: PUT failed with HTTP response code 405
> at
> org.eclipse.emf.ecore.resource.impl.URIHandlerImpl$1.close(URIHandlerImpl.java:123)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfChangedWithMemoryBuffer(ResourceImpl.java:1228)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:972)
> at
> org.eclipse.emf.importer.ModelImporter.saveGenModelAndEPackages(ModelImporter.java:763)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.doPerformFinish(ModelImporterWizard.java:157)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard$1.execute(ModelConverterWizard.java:222)
> ... 61 more


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: exception when creating genmodel (Juno) [message #1411273 is a reply to message #895749] Fri, 22 August 2014 21:42 Go to previous messageGo to next message
Ed Seidewitz is currently offline Ed SeidewitzFriend
Messages: 9
Registered: July 2011
Junior Member
Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=382637 is marked as fixed, and I have not had the problem discussed in this thread in a while. However, now that I have installed Luna and UML2 5.0.0, it seems to be back. Is anyone else having this problem again?
Re: exception when creating genmodel (Juno) [message #1411409 is a reply to message #1411273] Sat, 23 August 2014 08:01 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Ed

The original bug was a consequence of the UML 2.4.1 support separating
out a (Primitive)Types package and not ensuring that it was always
registered.

Similar problems occurred in the Luna run up with the UML 2.5 support.

However there is now a UMLResourcesUtil.init() that ensures that the
many required registrations occur. Any user/application that does not
call this is guaranteed to have major migration headaches.

Regards

Ed Willink


On 22/08/2014 22:42, Ed Seidewitz wrote:
> Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=382637 is marked as
> fixed, and I have not had the problem discussed in this thread in a
> while. However, now that I have installed Luna and UML2 5.0.0, it seems
> to be back. Is anyone else having this problem again?
Re: exception when creating genmodel (Juno) [message #1411414 is a reply to message #1411409] Sat, 23 August 2014 08:18 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Some of the UML 2.4.1 problems were caused by being helpful; the new
Types model was hidden/auto-referenced so that migrating users did not
need to worry about it. This made the hidden package very irregular. I
think that it is now regular so perhaps you need to include
Types.genmodel in your used genmodels.

Regards

Ed Willink


On 23/08/2014 09:01, Ed Willink wrote:
> Hi Ed
>
> The original bug was a consequence of the UML 2.4.1 support separating
> out a (Primitive)Types package and not ensuring that it was always
> registered.
>
> Similar problems occurred in the Luna run up with the UML 2.5 support.
>
> However there is now a UMLResourcesUtil.init() that ensures that the
> many required registrations occur. Any user/application that does not
> call this is guaranteed to have major migration headaches.
>
> Regards
>
> Ed Willink
>
>
> On 22/08/2014 22:42, Ed Seidewitz wrote:
>> Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=382637 is marked as
>> fixed, and I have not had the problem discussed in this thread in a
>> while. However, now that I have installed Luna and UML2 5.0.0, it seems
>> to be back. Is anyone else having this problem again?
>
Re: exception when creating genmodel (Juno) [message #1412205 is a reply to message #1411414] Mon, 25 August 2014 14:45 Go to previous messageGo to next message
Ed Seidewitz is currently offline Ed SeidewitzFriend
Messages: 9
Registered: July 2011
Junior Member
Ed --

I do use UMLResourceUtil.init() when using the metamodel at runtime, but I am not sure that this is relevant to creating a genmodel.

And I did have Types.genmodel included as a used genmodel from before. However, when I tried to reload the ecore model into the genmodel under Luna, I got the old error again. I also get the error when I try to create a new genmodel. There does not seem to be any way to select Types to be used model during the genmodel dialog, but even trying to fix up the genmodel XMI by hand after the fact doesn't seem to work for me.

-- Ed
Re: exception when creating genmodel (Juno) [message #1412226 is a reply to message #1412205] Mon, 25 August 2014 15:54 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Ed

Sounds like it needs a new Bugzilla.

Regards

Ed Willink


On 25/08/2014 15:45, Ed Seidewitz wrote:
> Ed --
>
> I do use UMLResourceUtil.init() when using the metamodel at runtime, but
> I am not sure that this is relevant to creating a genmodel.
>
> And I did have Types.genmodel included as a used genmodel from before.
> However, when I tried to reload the ecore model into the genmodel under
> Luna, I got the old error again. I also get the error when I try to
> create a new genmodel. There does not seem to be any way to select Types
> to be used model during the genmodel dialog, but even trying to fix up
> the genmodel XMI by hand after the fact doesn't seem to work for me.
>
> -- Ed
Previous Topic:ExportAllDiagrams/Model Validation very slow on Luna
Next Topic:defining a new data type
Goto Forum:
  


Current Time: Tue Apr 16 10:22:28 GMT 2024

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

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

Back to the top