Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » KDM -> UML2 Conversion with Helios
KDM -> UML2 Conversion with Helios [message #543186] Mon, 28 June 2010 16:04 Go to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 340
Registered: July 2009
Senior Member
Hi MoDisco Team,

I have tried KDM to UML2 conversion programmaticaly by using the
org.eclipse.gmt.modisco.kdm.uml2converter.impl.KdmtoUmlConve rterImpl
class on Helios, but I have a exception at UML2 metamodel loading.
Indeed, MoDisco tries to load the 2.1.0 UML2 metamodel release while on
Helios the UML2 metamodel release is 3.0.0.
Should you use UMLPackage.eNS_URI field instead of the static
"http://www.eclipse.org/uml2/2.1.0/UML" string?

This is the stack trace :

java.lang.RuntimeException: Model handler for UML2 not found. You may
need to install a model handler plugin.
at
org.eclipse.m2m.atl.engine.vm.AtlModelHandler.getDefault(Atl ModelHandler.java:93)
at
org.eclipse.m2m.atl.core.ui.vm.asm.ASMFactory.getMetametamod el(ASMFactory.java:195)
at
org.eclipse.m2m.atl.core.ui.vm.asm.ASMFactory.newReferenceMo del(ASMFactory.java:128)
at
org.eclipse.gmt.modisco.kdm.uml2converter.impl.KdmtoUmlConve rterImpl.getUML2ModelFromKDMModelWithCustomTransformation(Kd mtoUmlConverterImpl.java:179)
at
org.eclipse.gmt.modisco.kdm.uml2converter.impl.KdmtoUmlConve rterImpl.getUML2ModelFromKDMModel(KdmtoUmlConverterImpl.java :112)
at
org.dugueperoux.esteban.projects.ide.models.interface_.modis co.InterfaceDiscoverer.testJavaDescovering(InterfaceDiscover er.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall( FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(Refl ectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(Fr ameworkMethod.java:41)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate( InvokeMethod.java:20)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit 4ClassRunner.java:76)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit 4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java: 52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java :191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java: 42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java: 184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:116)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3527)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3174)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 27)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
at
org.eclipse.pde.internal.junit.runtime.UITestApplication.sta rt(UITestApplication.java:47)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)



And when I try to do conversion by popup menu action, I have the
following log in my error log view :

org.eclipse.m2m.atl.engine.vm.VMException: Cannot set feature
uml!Model.packagedElement to value
org.eclipse.uml2.uml.internal.impl.PropertyImpl@1c3b06c (name: <unset>,
visibility: <unset>) (isLeaf: false) (isStatic: false) (isOrdered:
false, isUnique: true, isReadOnly: false) (isDerived: false,
isDerivedUnion: false, aggregation: none)
at A.__applyCodeModelToModel(1 : NTransientLink;) :
??#14(KDMtoUML.atl[404:3-404:37])
local variables = {tgt=umlOutput!<notnamedyet>,
src=kdmInput!externals, link=TransientLink {rule = 'CodeModelToModel',
sourceElements = {src = kdmInput!externals}, targetElements = {tgt =
umlOutput!<notnamedyet>}, variables = {}}, self=KDMtoUML : ASMModule}
local stack = [umlOutput!<notnamedyet>]
Java Stack:
org.eclipse.m2m.atl.engine.vm.VMException: Cannot set feature
uml!Model.packagedElement to value
org.eclipse.uml2.uml.internal.impl.PropertyImpl@1c3b06c (name: <unset>,
visibility: <unset>) (isLeaf: false) (isStatic: false) (isOrdered:
false, isUnique: true, isReadOnly: false) (isDerived: false,
isDerivedUnion: false, aggregation: none)
at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:491)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:323)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:173)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:130)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:78)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:251)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:357)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:173)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:130)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:78)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:251)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:173)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:346)
at
org.eclipse.m2m.atl.core.ui.vm.RegularVMLauncher.internalLau nch(RegularVMLauncher.java:252)
at
org.eclipse.m2m.atl.core.ui.vm.RegularVMLauncher.launch(Regu larVMLauncher.java:163)
at
org.eclipse.gmt.modisco.kdm.uml2converter.impl.KdmtoUmlConve rterImpl$1.run(KdmtoUmlConverterImpl.java:228)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ArrayStoreException
at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:124)
at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:424)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:331)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:288)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList. java:307)
at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:488)
... 16 more


Best Regards.
Re: KDM -> UML2 Conversion with Helios [message #543344 is a reply to message #543186] Tue, 29 June 2010 07:46 Go to previous messageGo to next message
Fabien Giquel is currently offline Fabien GiquelFriend
Messages: 138
Registered: July 2009
Senior Member
Hi Esteban,

first, about the second problem "Cannot set feature
uml!Model.packagedElement" (popup conversion action) :
a fix has just been commited into SVN
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=317854), and will be soon
available from the nightly update site to come.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
Re: KDM -> UML2 Conversion with Helios [message #543651 is a reply to message #543186] Wed, 30 June 2010 08:09 Go to previous messageGo to next message
Fabien Giquel is currently offline Fabien GiquelFriend
Messages: 138
Registered: July 2009
Senior Member
Hi Esteban,

i will now try to answer about your first problem : "Model Handler for
UML2 not found".
The fact is that the KDM 2 UML transformation was written based on
"http://www.eclipse.org/uml2/2.1.0/UML". The eclipse UML components
maintains compatibility and a package for
"http://www.eclipse.org/uml2/2.1.0/UML" is still registered in EMF
registry. So there is no problem using it.

Could you check into your platform if the plugin
"org.eclipse.m2m.atl.drivers.uml24atl" is installed ? This plugin
defines a ATL Model handler for the metamodel called "UML2". I see that
we did not put it as a prerequisite of our "oegm.kdm.uml2converter", and
it might be the cause of your trouble.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
Re: KDM -> UML2 Conversion with Helios [message #543816 is a reply to message #543651] Wed, 30 June 2010 16:19 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 340
Registered: July 2009
Senior Member
Hi Fabien,

Ok I understand better my issue, I tested the KdmtoUmlConverterImpl in a
Junit Plugin Test without "org.eclipse.m2m.atl.drivers.uml24atl" plugin
in dependencies. Now with this plugin it works fine.

Thanks Fabien.


On 30/06/2010 10:09, Fabien wrote:
> Hi Esteban,
>
> i will now try to answer about your first problem : "Model Handler for
> UML2 not found".
> The fact is that the KDM 2 UML transformation was written based on
> "http://www.eclipse.org/uml2/2.1.0/UML". The eclipse UML components
> maintains compatibility and a package for
> "http://www.eclipse.org/uml2/2.1.0/UML" is still registered in EMF
> registry. So there is no problem using it.
>
> Could you check into your platform if the plugin
> "org.eclipse.m2m.atl.drivers.uml24atl" is installed ? This plugin
> defines a ATL Model handler for the metamodel called "UML2". I see that
> we did not put it as a prerequisite of our "oegm.kdm.uml2converter", and
> it might be the cause of your trouble.
>
>
Re: KDM -> UML2 Conversion with Helios [message #543949 is a reply to message #543816] Thu, 01 July 2010 07:45 Go to previous message
Fabien Giquel is currently offline Fabien GiquelFriend
Messages: 138
Registered: July 2009
Senior Member
Ok, i will add the dependency in "oegm.kdm.uml2converter" to prevent
such an issue.

Regards.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
Re: KDM -> UML2 Conversion with Helios [message #575373 is a reply to message #543186] Tue, 29 June 2010 07:46 Go to previous message
Fabien Giquel is currently offline Fabien GiquelFriend
Messages: 138
Registered: July 2009
Senior Member
Hi Esteban,

first, about the second problem "Cannot set feature
uml!Model.packagedElement" (popup conversion action) :
a fix has just been commited into SVN
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=317854), and will be soon
available from the nightly update site to come.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
Re: KDM -> UML2 Conversion with Helios [message #575390 is a reply to message #543186] Wed, 30 June 2010 08:09 Go to previous message
Fabien Giquel is currently offline Fabien GiquelFriend
Messages: 138
Registered: July 2009
Senior Member
Hi Esteban,

i will now try to answer about your first problem : "Model Handler for
UML2 not found".
The fact is that the KDM 2 UML transformation was written based on
"http://www.eclipse.org/uml2/2.1.0/UML". The eclipse UML components
maintains compatibility and a package for
"http://www.eclipse.org/uml2/2.1.0/UML" is still registered in EMF
registry. So there is no problem using it.

Could you check into your platform if the plugin
"org.eclipse.m2m.atl.drivers.uml24atl" is installed ? This plugin
defines a ATL Model handler for the metamodel called "UML2". I see that
we did not put it as a prerequisite of our "oegm.kdm.uml2converter", and
it might be the cause of your trouble.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
Re: KDM -> UML2 Conversion with Helios [message #575415 is a reply to message #543651] Wed, 30 June 2010 16:19 Go to previous message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 340
Registered: July 2009
Senior Member
Hi Fabien,

Ok I understand better my issue, I tested the KdmtoUmlConverterImpl in a
Junit Plugin Test without "org.eclipse.m2m.atl.drivers.uml24atl" plugin
in dependencies. Now with this plugin it works fine.

Thanks Fabien.


On 30/06/2010 10:09, Fabien wrote:
> Hi Esteban,
>
> i will now try to answer about your first problem : "Model Handler for
> UML2 not found".
> The fact is that the KDM 2 UML transformation was written based on
> "http://www.eclipse.org/uml2/2.1.0/UML". The eclipse UML components
> maintains compatibility and a package for
> "http://www.eclipse.org/uml2/2.1.0/UML" is still registered in EMF
> registry. So there is no problem using it.
>
> Could you check into your platform if the plugin
> "org.eclipse.m2m.atl.drivers.uml24atl" is installed ? This plugin
> defines a ATL Model handler for the metamodel called "UML2". I see that
> we did not put it as a prerequisite of our "oegm.kdm.uml2converter", and
> it might be the cause of your trouble.
>
>
Re: KDM -> UML2 Conversion with Helios [message #575423 is a reply to message #543816] Thu, 01 July 2010 07:45 Go to previous message
Fabien Giquel is currently offline Fabien GiquelFriend
Messages: 138
Registered: July 2009
Senior Member
Ok, i will add the dependency in "oegm.kdm.uml2converter" to prevent
such an issue.

Regards.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
Previous Topic:KDM -> UML2 Conversion with Helios
Next Topic:PHP-Java migration
Goto Forum:
  


Current Time: Sun Dec 21 17:30:38 GMT 2014

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

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