Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » Can't discover UML model from KDM model: exception
Can't discover UML model from KDM model: exception [message #1479577] Wed, 19 November 2014 14:54 Go to next message
Verses the Persian is currently offline Verses the PersianFriend
Messages: 12
Registered: January 2014
Junior Member
I have discovered a KDM model from my Android project. This works. But discovering an UML model from this is not possible. I get following error message:

Cannot set feature uml!InterfaceRealization.contract to value org.eclipse.emf.ecore.impl.DynamicEObjectImpl@549e7f73 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@13d2db93 (name: Class) (instanceClassName: null) (abstract: false, interface: false)) (org.eclipse.modisco.kdm.uml2converter_0.12.1.201408191633)


Exception Stack Trace:
org.eclipse.m2m.atl.engine.vm.VMException: Cannot set feature uml!InterfaceRealization.contract to value org.eclipse.emf.ecore.impl.DynamicEObjectImpl@549e7f73 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@13d2db93 (name: Class) (instanceClassName: null) (abstract: false, interface: false))
	at A.__applyImplementsToInterfaceRealization(1 : NTransientLink;) : ??#26(KDMtoUML.atl[541:3-541:89])
		local variables = {tgt=umlOutput!<notnamedyet>, src=kdmInput!<unnamed>, link=TransientLink {rule = 'ImplementsToInterfaceRealization', sourceElements = {src = kdmInput!<unnamed>}, 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!InterfaceRealization.contract to value org.eclipse.emf.ecore.impl.DynamicEObjectImpl@549e7f73 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@13d2db93 (name: Class) (instanceClassName: null) (abstract: false, interface: false))
	at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(ASMEMFModelElement.java:513)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:323)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:357)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.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.engine.vm.AtlLauncher.launch(AtlLauncher.java:216)
	at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:127)
	at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:92)
	at org.eclipse.modisco.util.atl.core.internal.AtlLaunchHelper.runTransformation(AtlLaunchHelper.java:194)
	at org.eclipse.modisco.util.atl.core.internal.AtlLaunchHelper.runTransformation(AtlLaunchHelper.java:173)
	at org.eclipse.modisco.kdm.uml2converter.internal.KdmToUmlConverter.getUML2ModelFromKDMModelWithCustomTransformation(KdmToUmlConverter.java:115)
	at org.eclipse.modisco.kdm.uml2converter.internal.KdmToUmlConverter.getUML2ModelFromKDMModel(KdmToUmlConverter.java:80)
	at org.eclipse.modisco.kdm.uml2converter.DiscoverUmlModelFromKdmModel.basicDiscoverElement(DiscoverUmlModelFromKdmModel.java:89)
	at org.eclipse.modisco.kdm.uml2converter.DiscoverUmlModelFromKdmModel.basicDiscoverElement(DiscoverUmlModelFromKdmModel.java:1)
	at org.eclipse.modisco.infra.discovery.core.AbstractDiscoverer.discoverElement(AbstractDiscoverer.java:93)
	at org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer.discoverElement(AbstractModelDiscoverer.java:183)
	at org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener.discovererElement(MoDiscoMenuSelectionListener.java:229)
	at org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener$1.run(MoDiscoMenuSelectionListener.java:168)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassCastException: The value of type 'org.eclipse.emf.ecore.impl.EClassImpl@13d2db93 (name: Class) (instanceClassName: null) (abstract: false, interface: false)' must be of type 'org.eclipse.emf.ecore.impl.EClassImpl@25554c2a (name: Interface) (instanceClassName: null) (abstract: false, interface: false)'
	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.dynamicSet(EStructuralFeatureImpl.java:2653)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:1127)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1101)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1071)
	at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(ASMEMFModelElement.java:510)
	... 26 more


What is the problem?

Many thanks in advance!
Re: Can't discover UML model from KDM model: exception [message #1479717 is a reply to message #1479577] Wed, 19 November 2014 17:21 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
In case this particular issue is not already reported on the Bugzilla, I invite you to submit a corresponding bug.

For now, you can take a look to a direct Java-to-UML model discoverer built in the context of the ARTIST EU project.
It is actually packaged as a plugin providing a MoDisco model discoverer.
You can get its sources from https://github.com/artist-project/ARTIST/tree/master/source/Tooling/migration/application-discovery-understanding/MDT/eu.artist.migration.mdt.javaee.java.umlclass


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Can't discover UML model from KDM model: exception [message #1479845 is a reply to message #1479717] Wed, 19 November 2014 19:42 Go to previous messageGo to next message
Verses the Persian is currently offline Verses the PersianFriend
Messages: 12
Registered: January 2014
Junior Member
Hugo Bruneliere wrote on Wed, 19 November 2014 18:21
For now, you can take a look to a direct Java-to-UML model discoverer built in the context of the ARTIST EU project.
It is actually packaged as a plugin providing a MoDisco model discoverer.
You can get its sources from https://github.com/artist-project/ARTIST/tree/master/source/Tooling/migration/application-discovery-understanding/MDT/eu.artist.migration.mdt.javaee.java.umlclass


Uhm... thanks, but unfortunately I don't understand how to use it...
Re: Can't discover UML model from KDM model: exception [message #1480544 is a reply to message #1479845] Thu, 20 November 2014 09:10 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Well, once the plugin installed in your Eclipse, it runs as any MoDisco discoverer via a contextual action.
You can right-click on the Java model previously obtained with MoDisco Java discoverer and then simply select "Discovery/Discoverers/Java2UMLDiscoverer - Class diagram".
More info, including documentation and demo, will be made available in the coming weeks via the ARTIST project release.
If you're looking for a deployable version of the plugin rather than its sources, you can get one from https://github.com/artist-project/ARTIST/blob/master/binary/JAVA2UML/eu.artist.migration.mdt.javaee.java.umlclass_1.0.0.201409081319.jar (Windows - 64 bits).


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Can't discover UML model from KDM model: exception [message #1480588 is a reply to message #1480544] Thu, 20 November 2014 09:57 Go to previous messageGo to next message
Verses the Persian is currently offline Verses the PersianFriend
Messages: 12
Registered: January 2014
Junior Member
Hugo Bruneliere wrote on Thu, 20 November 2014 10:10
You can right-click on the Java model previously obtained with MoDisco Java discoverer and then simply select "Discovery/Discoverers/Java2UMLDiscoverer - Class diagram.


I get following error message:
'MoDisco discoverer "eu.artist.migration.mdt.javaee.java.umlclass" in progress...' has encountered a problem.


Details:
An internal error occurred during: "MoDisco discoverer "eu.artist.migration.mdt.javaee.java.umlclass" in progress...".
org.eclipse.m2m.atl.engine.emfvm.VMException


Exception Stack Trace:
org.eclipse.m2m.atl.engine.emfvm.VMException
	at main#22(java2UML.atl[69:40-69:82])
		local variables: self=java2UML : ASMModule
Java Stack:
org.eclipse.m2m.atl.engine.emfvm.VMException
	at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:643)
	at org.eclipse.m2m.atl.engine.emfvm.ASM.run(ASM.java:208)
	at org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.internalLaunch(EMFVMLauncher.java:170)
	at org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.launch(EMFVMLauncher.java:139)
	at eu.artist.migration.mdt.javaee.java.umlclass.Java2UMLDiscoverer.basicDiscoverElement(Java2UMLDiscoverer.java:80)
	at eu.artist.migration.mdt.javaee.java.umlclass.Java2UMLDiscoverer.basicDiscoverElement(Java2UMLDiscoverer.java:1)
	at org.eclipse.modisco.infra.discovery.core.AbstractDiscoverer.discoverElement(AbstractDiscoverer.java:93)
	at org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer.discoverElement(AbstractModelDiscoverer.java:183)
	at org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener.discovererElement(MoDiscoMenuSelectionListener.java:229)
	at org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener$1.run(MoDiscoMenuSelectionListener.java:168)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.util.NoSuchElementException
	at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(Unknown Source)
	at java.util.LinkedHashMap$KeyIterator.next(Unknown Source)
	at org.eclipse.m2m.atl.engine.emfvm.lib.ExecEnv$100.exec(ExecEnv.java:992)
	at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:391)
	... 10 more


Re: Can't discover UML model from KDM model: exception [message #1480668 is a reply to message #1480588] Thu, 20 November 2014 11:18 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
It seems an unexpected error occurred during the Java-to-UML transformation.
Several things that could be checked:

  • Are you also using an Eclipse install Windows 64 bits (if you used the provided plugin as Jar) with corresponding MoDisco and ATL versions? If you use Luna, Kepler could be tested too to check.
  • What is the size of the input Java model? In case it is relatively big, sufficient memory should be allocated when launching Eclipse.
  • Is there a log file that is produced containing more precise trace from the ATL VM running the transformation?

If none of these is helping, it may be the particular case where something in the Java model is not yet managed properly by the current version of the Java-to-UML converter.
It would be interesting to identify/know what in this case.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Can't discover UML model from KDM model: exception [message #1480920 is a reply to message #1480668] Thu, 20 November 2014 15:53 Go to previous messageGo to next message
Verses the Persian is currently offline Verses the PersianFriend
Messages: 12
Registered: January 2014
Junior Member
Hugo Bruneliere wrote on Thu, 20 November 2014 12:18

  • Are you also using an Eclipse install Windows 64 bits (if you used the provided plugin as Jar) with corresponding MoDisco and ATL versions? If you use Luna, Kepler could be tested too to check.

I have Windows x64 and I have just installed MoDisco modelling components on my x64 Eclipse Luna through the "Install New Software..." option. Haven't tested on Kepler yet...


Hugo Bruneliere wrote on Thu, 20 November 2014 12:18

  • What is the size of the input Java model? In case it is relatively big, sufficient memory should be allocated when launching Eclipse.

Actually I don't know the size. The project itself is rather small, but there are also automatically generated classes and a dependency on another project. I don't know if these components are considered, too.


Hugo Bruneliere wrote on Thu, 20 November 2014 12:18

  • Is there a log file that is produced containing more precise trace from the ATL VM running the transformation?

I don't know. Where should I look for it?
Re: Can't discover UML model from KDM model: exception [message #1480989 is a reply to message #1480920] Thu, 20 November 2014 17:09 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Maybe you could do a quick test with Kepler, or just rebuild your own version of the plugin from the sources (cf. the initial link I sent you).
Concerning the size of the produced Java model, I was referring to the size of the corresponding XMI file. Anyway, if your project is rather small then it should not be so big I guess.
Could you check that you don't have a log file located at the same path than the input Java model?


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Previous Topic:MoDisco installation for UML reverse engineering
Next Topic:KDM2Java
Goto Forum:
  


Current Time: Sat Apr 20 02:02:03 GMT 2024

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

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

Back to the top