Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] "Copy" reference problem (?)
[ATL] "Copy" reference problem (?) [message #554798] Tue, 24 August 2010 12:35 Go to next message
Michael Schmitz is currently offline Michael SchmitzFriend
Messages: 3
Registered: August 2010
Junior Member
Sorry, but I don't really understand the problem, which ATL has, and the error message as well. I try to explain:

I've got two different Metamodels: MM0 and MM1. MM0 has a class A und MM1 has a class named B. MM0!A has a directed 0..1-association to MM1!B called linked. The instances of the MMs are in different files as well. So in the file f0.mm0 (for MM0) is a href to the file f0.mm1 (MM1) to the linked element.

The Problem: An easy m2m-transformation with ATL which only "copy" the file f0.mm0 to f1.mm0 doesn't work.

The following code shows the "copy":
module test;
create OUTmm0: MM0 from INmm0 : MM0;

rule A2A {
	from s : MM0!A in INmm0
	to t : MM0!A in OUTmm0(
		linked <- s.linked
	)
}

The access to s.linked will thrown the error-message :


org.eclipse.m2m.atl.engine.emfvm.VMException: The value of type 'class org.eclipse.emf.ecore.impl.DynamicEObjectImpl' must be of type 'org.eclipse.emf.ecore.impl.EClassImpl@554d2af5 (name: A) (instanceClassName: null) (abstract: false, interface: false)' ....


I've found a workaround also:
It works if I change multiplicity of the association linked from 0..1 to 0..* in MM0.

But I don't want to change my metamodel. By the way, the transformation with ETL works fine.

Has anybody such a problem and solved it without changing the metamodel?



System: Windows7 (x64) with eclipse Helios Release
Build id: 20100617-1415 and ATL 3.1.0
Re: [ATL] "Copy" reference problem (?) [message #554811 is a reply to message #554798] Tue, 24 August 2010 13:08 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
Did you enable the inter-model references ?
Re: [ATL] "Copy" reference problem (?) [message #554853 is a reply to message #554811] Tue, 24 August 2010 14:39 Go to previous messageGo to next message
Michael Schmitz is currently offline Michael SchmitzFriend
Messages: 3
Registered: August 2010
Junior Member
Thanks for your help.

Yes, I have enable the inter-model references.
I think it's lay to the multiplicity of the association because it is possible to refer to another model when the multiplicity is * (inf.).
Re: [ATL] "Copy" reference problem (?) [message #554862 is a reply to message #554798] Tue, 24 August 2010 14:57 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
Have you tried to switch VM then ? I remember I had a similar problem; don't exactly remember how I solved it tho Embarrassed
Re: [ATL] "Copy" reference problem (?) [message #554902 is a reply to message #554862] Tue, 24 August 2010 16:35 Go to previous messageGo to next message
Michael Schmitz is currently offline Michael SchmitzFriend
Messages: 3
Registered: August 2010
Junior Member
Thanks. I switched the VM, it doesn't help. I do all things, that might be helpful in the past (and I've found in forums). But now, I really don't know what I should do. The behaviour of ATL is so strange, that I can't explain my problem exactly. It has to work, but it doesn't. It could be a bug. I don't know. Sad
Re: [ATL] "Copy" reference problem (?) [message #555021 is a reply to message #554798] Wed, 25 August 2010 08:27 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
This is definitely a bug btw
Previous Topic:[QVTO] Eclipse 3.6 editor auto-complete problem
Next Topic:Extraction to multiple files
Goto Forum:
  


Current Time: Fri Apr 19 23:03:54 GMT 2024

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

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

Back to the top