Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Problem creating a metamodel that extends UML2
Problem creating a metamodel that extends UML2 [message #769820] Thu, 22 December 2011 18:27 Go to next message
Reinaldo Junior is currently offline Reinaldo JuniorFriend
Messages: 36
Registered: March 2011
Member

I created an Ecore metamodel that extends the UML metamodel (URI: http://www.eclipse.org/uml2/3.0.0/UML) from the uml2 plugin.

In my Ecore, I choosed "Load Resource" > "Browse Registered Packages" > "Runtime Version" and choosed the UML metamodel. Then I created an EClass "MyPackage" having "Package" (from UML) as superclass.

In the Manifest.mf I added the plugin "org.eclipse.uml2.uml" (version 3.2.100) as a dependency.

But when I tried to create a genmodel from this ecore, the UML model doesn't appear at the "Referenced generator models" (this is expected once the UML metamodel is referenced from a plugin, right?).

And when I click "Finish" I always get an error message:
java.io.IOException: PUT failed with HTTP response code 405
	at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl$1.close(URIHandlerImpl.java:129)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfChangedWithMemoryBuffer(ResourceImpl.java:1234)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:978)
	at org.eclipse.emf.importer.ModelImporter.saveGenModelAndEPackages(ModelImporter.java:769)
	at org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.doPerformFinish(ModelImporterWizard.java:150)
	at org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard$1.execute(ModelConverterWizard.java:228)
	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)
	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:1029)
	at org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard.performFinish(ModelConverterWizard.java:246)
	at org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.performFinish(ModelImporterWizard.java:157)
	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:240)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
	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:257)
	at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	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.Display.sendEvent(Display.java:4128)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)


Is there any special configuration needed?
Re: Problem creating a metamodel that extends UML2 [message #769834 is a reply to message #769820] Thu, 22 December 2011 19:01 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

java.io.IOException: PUT failed with HTTP response code 405

is a sure sign that a URI such as
http://www.eclipse.org/uml2/3.0.0/UMLhas not been mapped to a registered
model and so has attempted an Internet access. Fortunately it failed and
gave a simple message. When it succeeds it can be really confusing.

Extending the Ecore or UML meta-models is a very bad idea. Ecore is
optimised for its own purposes that conflict with extension. UML is huge
and your reuse will be even larger when surely you had a sensible
problem to solve.

Regards

Ed Willink


On 22/12/2011 18:27, Reinaldo Junior wrote:
> I created an Ecore metamodel that extends the UML metamodel (URI:
> http://www.eclipse.org/uml2/3.0.0/UML) from the uml2 plugin.
>
> In my Ecore, I choosed "Load Resource" > "Browse Registered Packages"
> > "Runtime Version" and choosed the UML metamodel. Then I created an
> EClass "MyPackage" having "Package" (from UML) as superclass.
>
> In the Manifest.mf I added the plugin "org.eclipse.uml2.uml" (version
> 3.2.100) as a dependency.
>
> But when I tried to create a genmodel from this ecore, the UML model
> doesn't appear at the "Referenced generator models" (this is expected
> once the UML metamodel is referenced from a plugin, right?).
>
> And when I click "Finish" I always get an error message:
> java.io.IOException: PUT failed with HTTP response code 405
> at
> org.eclipse.emf.ecore.resource.impl.URIHandlerImpl$1.close(URIHandlerImpl.java:129)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfChangedWithMemoryBuffer(ResourceImpl.java:1234)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:978)
> at
> org.eclipse.emf.importer.ModelImporter.saveGenModelAndEPackages(ModelImporter.java:769)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.doPerformFinish(ModelImporterWizard.java:150)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard$1.execute(ModelConverterWizard.java:228)
> 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)
> 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:1029)
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard.performFinish(ModelConverterWizard.java:246)
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.performFinish(ModelImporterWizard.java:157)
> 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:240)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
> 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:257)
> at
> org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277)
> at
> org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
> at
> org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
> at
> org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
> at
> org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
> 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.Display.sendEvent(Display.java:4128)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
> 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:344)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
>
> Is there any special configuration needed?
>
Previous Topic:import XMI per Input Stream
Next Topic:UML 2 3.1.0
Goto Forum:
  


Current Time: Fri Apr 26 13:46:47 GMT 2024

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

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

Back to the top