Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Public2Private Example(How to run it?)
Public2Private Example [message #1839489] Mon, 22 March 2021 15:15 Go to next message
Mohammed Hamdi is currently offline Mohammed HamdiFriend
Messages: 5
Registered: March 2021
Junior Member
Hello,

I am a beginner with ATL. I installed the Public2Private example but it does not run on my machine.

This is the error which shows to me when I run the code:

Error loading platform:/resource/Public2Private/UMLDI.xmi: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'null' not found. (platform:/resource/Public2Private/UMLDI.xmi, 3, 15)

A screenshot of my running configuration is attached.

Could you please explain to me the reason?

Thanks in advance,

Mohammed
Re: Public2Private Example [message #1839546 is a reply to message #1839489] Tue, 23 March 2021 16:43 Go to previous messageGo to next message
Mohammed Hamdi is currently offline Mohammed HamdiFriend
Messages: 5
Registered: March 2021
Junior Member
I added the import for the ATL2010 Compiler on the header of the atl file but I got the following error:

org.eclipse.m2m.atl.engine.emfvm.VMException: Cannot find class Attribute in reference model UML
at __matchReadOnlyPublicAttribute#2(Public2Private.atl)
local variables: self=Public2Private : ASMModule
at __matcher__#1(Public2Private.atl)
local variables: self=Public2Private : ASMModule
at main#22(Public2Private.atl)
local variables: self=Public2Private : ASMModule

Attached is a screenshot of the atl's header, I really appreciate any help.

[Updated on: Wed, 24 March 2021 19:08]

Report message to a moderator

Re: Public2Private Example [message #1839631 is a reply to message #1839546] Wed, 24 March 2021 20:21 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

The example you picked is from 2005, and uses a UML 1.x metamodel, serialized in XMI 1.2. This requires the use of the ATL Regular VM with the NetBeans MDR model handler. It cannot be run on top of EMF (which uses XMI 2.0). It should be noted that the examples found at https://www.eclipse.org/atl/atlTransformations/ constitute the Transformation "Zoo": it is full of interesting, historical examples, which do not necessarily run on the current version of ATL.

If you want to learn ATL, start with the tutorial at https://wiki.eclipse.org/ATL/Tutorials_-_Create_a_simple_ATL_transformation

After that, I recommend you look for the most recent ATL examples and code snippets you can find, as they are most likely to run on the latest version of ATL. Also, it is good to know there are multiple ATL runtimes available, of which EMFTVM is the latest.


Cheers,
Dennis
Re: Public2Private Example [message #1839636 is a reply to message #1839631] Wed, 24 March 2021 22:50 Go to previous message
Mohammed Hamdi is currently offline Mohammed HamdiFriend
Messages: 5
Registered: March 2021
Junior Member
Thank you for your reply Dennis, the resources you provided are very helpful.

Actually, I was not aware about the old version of UML that has been used in Public2Private Example. However, I created my own example using the recent version of UML and everything is fine now.

Regards,
Previous Topic:Potential bug with resolveTemp()
Next Topic:Mapping large source model
Goto Forum:
  


Current Time: Sat Nov 11 08:17:36 GMT 2023

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

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

Back to the top