Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Error loading platform
[ATL] Error loading platform [message #524000] Tue, 30 March 2010 09:05 Go to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
I created a Xpand project, with two metamodels, one called metamodel (an object metamodel), and another metamodel called relationnel (an relationnal metamodel).

Now I'm trying to transform an xmi model I created following the object metamodel into a relationnal metamodel.

I started with the basics, for all objects of type Class (in object metamodel), I want an Object of type Table (in relationnal metamodel). both have a name attribute.

when I try to run my ATL file, I get
Error loading platform:/resource/Object2Relationnal/metamodels/metamodel.ecore: null


What does that mean ?
my metamodel is in metamodels folder, and the project name is Object2Relationnal, so it should be able to find it.

Here is my atl file
module Object2Relationnal;

-- @path Object=/metamodels/metamodel.ecore
-- @path Relationnel=/metamodels/relationnel.ecore

create Out : Relationnel from IN : Object;

-- Takes all classes from Model, and creates a Table from it
rule Class2Table{
	from
		s : Object!Class
	to
		t : Relationnel!Table(
			name <- s.name
		)
}


One day I shall master M2T, but that day has yet to come...
Re: [ATL] Error loading platform [message #524030 is a reply to message #524000] Tue, 30 March 2010 07:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thierry.fortin.obeo.fr

Hello Maxime,

First of all, your two "-- @path" lines won't work, because you have to
include the project name in the path. So your complete path lines would be:

-- @path Object=/Object2Relationnal/metamodels/metamodel.ecore
-- @path Relationnel=/Object2Relationnal/metamodels/relationnel.ecore

These lines are generally put at the top of the file, above the module
declaration. But actually, they are only used for completion, so it
won't solve your problem.

Concerning the error you get, it's weird. Are you sure about your launch
configuration, that everything is correct (no confusion between
"relationnal" and "relationnel")? Could you be more accurate about you
launching the transformation?

Regards,


Thierry


Le 30/03/2010 11:05, Maxime Lecourt a écrit :
> I created a Xpand project, with two metamodels, one called metamodel (an
> object metamodel), and another metamodel called relationnel (an
> relationnal metamodel).
>
> Now I'm trying to transform an xmi model I created following the object
> metamodel into a relationnal metamodel.
>
> I started with the basics, for all objects of type Class (in object
> metamodel), I want an Object of type Table (in relationnal metamodel).
> both have a name attribute.
>
> when I try to run my ATL file, I get
> Error loading
> platform:/resource/Object2Relationnal/metamodels/metamodel.e core: null
>
>
> What does that mean ?
> my metamodel is in metamodels folder, and the project name is
> Object2Relationnal, so it should be able to find it.
>
> Here is my atl file
> module Object2Relationnal;
>
> -- @path Object=/metamodels/metamodel.ecore
> -- @path Relationnel=/metamodels/relationnel.ecore
>
> create Out : Relationnel from IN : Object;
>
> -- Takes all classes from Model, and creates a Table from it
> rule Class2Table{
> from
> s : Object!Class
> to
> t : Relationnel!Table(
> name <- s.name
> )
> }
Re: [ATL] Error loading platform [message #524040 is a reply to message #524000] Tue, 30 March 2010 12:53 Go to previous messageGo to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
I changed the two -- @path lines, to keep with tradition.
I changed all relationnel to relationnal (just in case), to no effect.

In my launch configuration,
my ATL Module is
/Object2Relationnal/Object2Relationnal.atl

I have my two metamodels
Object : /Object2Relationnal/metamodels/metamodel.ecore
Relationnal : /Object2Relationnal/metamodels/relationnel.ecore

My source model is
/Object2Relationnal/Model.xmi
conforms to Object

And my Target Model is
/Object2Relationnal/out.xmi (this file does not exist, it should be automatically created)
conforms to Relationnel

I "pick" the files through Eclipse Interface, so there should not be any confusion between name files. I did a copy/paste to copy my metamodels from another project, Model.xmi has been copied from same project.

Regards


One day I shall master M2T, but that day has yet to come...
Re: [ATL] Error loading platform [message #524198 is a reply to message #524000] Wed, 31 March 2010 07:04 Go to previous messageGo to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
After trying a bit more, I wonder if the problem might not be because of XML.

The Families.ecore from Families2Persons metamodel example starts like this :

<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
  <ecore:EPackage name="Families">
    <eClassifiers xsi:type="ecore:EClass" name="Family">
 


While my metamodel.ecore start like this :

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="metamodel"
    nsURI="http://www.example.org/metamodel" nsPrefix="metamodel">
  <eClassifiers xsi:type="ecore:EClass" name="Package">


Does it help ?


One day I shall master M2T, but that day has yet to come...
Re: [ATL] Error loading platform [message #524212 is a reply to message #524000] Wed, 31 March 2010 08:06 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
nope, both are valid constructs
Re: [ATL] Error loading platform [message #529608 is a reply to message #524000] Mon, 26 April 2010 14:19 Go to previous messageGo to next message
Marcel  is currently offline Marcel Friend
Messages: 54
Registered: July 2009
Member
Has this problem been solved yet?
I have the same problem and I have no idea what it is caused by.
Re: [ATL] Error loading platform [message #529785 is a reply to message #524000] Tue, 27 April 2010 08:41 Go to previous messageGo to next message
Marcel  is currently offline Marcel Friend
Messages: 54
Registered: July 2009
Member
I managed to get it to work.

There was a problem with my metamodel.
I changed the Name, Ns Prefix and URI of my metamodel and that helped.
Re: [ATL] Error loading platform [message #535282 is a reply to message #524000] Fri, 21 May 2010 20:03 Go to previous messageGo to next message
ayoub is currently offline ayoubFriend
Messages: 25
Registered: March 2010
Junior Member
Hello
I have the same problem and I have no idea what it is caused by.
thank's in advance for your help
Re: [ATL] Error loading platform [message #670813 is a reply to message #535282] Sun, 15 May 2011 17:31 Go to previous messageGo to next message
Tom2000  is currently offline Tom2000 Friend
Messages: 6
Registered: May 2011
Junior Member
Here an other solution for the still existing problem.

In Persons.ecore file add
Name = Families
NS URI = http:someArbitraryNamespaceURI/Families/
Note: leave out NSPrefix

In Persons.ecore file add
Name = Persons
NS URI = http:someArbitraryNamespaceURI/Persons/
Note: leave out NSPrefix

and then add the namespace in sample-Families.ecore
<xmi:XMI xmi:version="2.0" xmlns:xmi="..."
xmlns="http:someArbitraryNamespaceURI/Families/">
<Family lastName="March">
<father firstName="Jim"/>
<mother firstName="Cindy"/>
<sons firstName="Brandon"/>
<daughters firstName="Brenda"/>
</Family> ...

greetings
Tom
(Sorry but i cant use links until 5 messages)

[Updated on: Sun, 15 May 2011 17:31]

Report message to a moderator

Re: [ATL] Error loading platform [message #670818 is a reply to message #670813] Sun, 15 May 2011 17:52 Go to previous message
Tom2000  is currently offline Tom2000 Friend
Messages: 6
Registered: May 2011
Junior Member
And for completion, the example with NSPrefix=Families and NSPrefix=Persons in the respective ecore.file.

Don't forget to register the Metamodel (Model.ecore) via right-click after changing!

<?xml version="1.0" encoding="ISO-8859-1"?>
<Families:Family xmi:version="2.0" xmlns:xmi="..."
xmlns:Families="http:someArbitraryNamespaceURI/Families/" lastName="March">
<father firstName="Jim"/>
<mother firstName="Cindy"/>
<sons firstName="Brandon"/>
<daughters firstName="Brenda"/>
</Families:Family>

Generated File:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="..." xmlns:Persons="http:someArbitraryNamespaceURI/Persons/">
<Persons:Male fullName="Jim March"/>
<Persons:Male fullName="Brandon March"/>
<Persons:Female fullName="Cindy March"/>
<Persons:Female fullName="Brenda March"/>
</xmi:XMI>
Previous Topic:[ATL] Using Enum
Next Topic:[QVTO] Problem with debugging M2M transformations
Goto Forum:
  


Current Time: Sat Apr 20 01:10:04 GMT 2024

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

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

Back to the top