Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] ERROR: cannot find ASMEMFModel for...
[ATL] ERROR: cannot find ASMEMFModel for... [message #2886] Wed, 27 December 2006 10:46 Go to next message
Matthias Bohlen is currently offline Matthias BohlenFriend
Messages: 30
Registered: July 2009
Member
Hi all,

I am transforming a UML2 model to some other metamodel. The UML2 model
references a profile which I also have included as an input model for
my transformation (appears in "create" declaration and in the models
map).

When I run this transformation inside Eclipse, all is fine. When I run
it outside Eclipse (in Maven), I get the following error message:

****** BEGIN Stack Trace
        message: ERROR: cannot find ASMEMFModel for
org.eclipse.uml2.impl.StereotypeImpl@ed9c28 (name: Entity, visibility:
public) (isLeaf: false, isAbstract: false) (isActive: false) with
extent org.eclipse.uml2.internal.util.UML2ResourceImpl@c08c0a
uri='file:/Users/BohlenMa/Programming/Eclipse/AndroMDA.V4/An dromda4/samples/chain/target/test-classes/org/andromda/sampl es/chain/EnterpriseAppProfile.profile.uml2'

I

added some debug output to ASMEMFModelElement.eObjectToASM() to print
the list of models in the current stackframe. It turns out that there
is a different instance of ASMEMFModel with a different extent but
which also points to the same profile model
(EnterpriseAppProfile.profile.uml2) with exactly the same URI.

How can this happen? EMF must have loaded the profile model ONCE MORE
although it was already loaded before.

Any ideas?
Cheers
Matthias
Re: [ATL] ERROR: cannot find ASMEMFModel for... [message #4804 is a reply to message #2886] Fri, 29 December 2006 17:45 Go to previous message
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 157
Registered: July 2009
Senior Member
Hi Matthias,

See below.

--- In atl_discussion@yahoogroups.com, Matthias Bohlen <infomail@...>
wrote:
>
> Hi all,
>
> I am transforming a UML2 model to some other metamodel. The UML2
> model references a profile which I also have included as an input
> model for my transformation (appears in "create" declaration and in
> the models map).
>
> When I run this transformation inside Eclipse, all is fine. When I
> run it outside Eclipse (in Maven), I get the following error message:
>
> ****** BEGIN Stack Trace
> message: ERROR: cannot find ASMEMFModel for
> org.eclipse.uml2.impl.StereotypeImpl@ed9c28 (name: Entity,
> visibility: public) (isLeaf: false, isAbstract: false) (isActive:
> false) with extent
> org.eclipse.uml2.internal.util.UML2ResourceImpl@c08c0a uri='file:/
> Users/BohlenMa/Programming/Eclipse/AndroMDA.V4/Andromda4/sam ples/
> chain/target/test-classes/org/andromda/samples/chain/
> EnterpriseAppProfile.profile.uml2'
>
> I added some debug output to ASMEMFModelElement.eObjectToASM() to
> print the list of models in the current stackframe. It turns out that
> there is a different instance of ASMEMFModel with a different extent
> but which also points to the same profile model
> (EnterpriseAppProfile.profile.uml2) with exactly the same URI.

Check the code you wrote in Maven to launch the ATL transformation.

> How can this happen?

There are several ways to launch an ATL transformation
including but not limited to:
- using an ATL launcher config (either via the GUI or the API)
- using an Ant script calling the am3.atl task
- using the ATL API (e.g., Java, Eclipse Monkey, Groove Monkey, ...)

To check for the kind of error you describe,
it is important to review the strategy you use
to ensure consistent use of models and metamodel references
in the ATL models map.

> EMF must have loaded the profile model ONCE MORE
> although it was already loaded before.

This can happen if, e.g., the ATL models map is inconsistent
w.r.t. the model / metamodel relationships.
Perhaps the consistency rule most often overlooked is the following:

- if the map has a model Mi (i.e., map[Ui] = Mi)
then make sure the map also includes Mi's metamodel
(i.e., there exists a uri, UUi, s.t.
map[UUi] = MMi and Mi.getMetamodel() = MMi)

-- Nicolas.

> Any ideas?
> Cheers
> Matthias
>
> ---
>
> Matthias Bohlen
> Beratung, Schulung, Coaching für IT-Projekte
>
> Website: http://www.mbohlen.de/
> Email: mbohlen@...
> Blog: http://www.mbohlen.de/blog/
>
> Post:
> Luise-Albertz-Str. 25
> D-53340 Meckenheim
>
> Tel: +49 (170) 772 8545
> Fax: +49 (2225) 945189
>
Previous Topic:[ATL] multiple references to an unique target model element
Next Topic:[ATL] how to use entity reference in input model
Goto Forum:
  


Current Time: Wed Apr 24 20:18:59 GMT 2024

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

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

Back to the top