Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » In my model, Class not found or is abstract
In my model, Class not found or is abstract [message #540786] Thu, 17 June 2010 11:25 Go to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
Hi,

I made a metamodel, where Items is my container EClass.

part of the metamodel :
<?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="hla"
    nsURI="http://hla/1.0" nsPrefix="hla">
  <eClassifiers xsi:type="ecore:EClass" name="Items">
    <eStructuralFeatures xsi:type="ecore:EReference" name="entities" upperBound="-1"
        eType="#//HEntity" derived="true" containment="true"/>
  </eClassifiers>


So after that I wanted to define a model
<?xml version="1.0" encoding="UTF-8"?>
<hla:Items xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:metamodel="http://www.example.org/metamodel" xsi:schemaLocation="http://www.example.org/metamodel metamodel/hla.ecore">
</hla:Items>


But I get "Class 'Items' is not found or is abstract". The most surprising is that it worked for a while.


One day I shall master M2T, but that day has yet to come...
Re: In my model, Class not found or is abstract [message #540819 is a reply to message #540786] Thu, 17 June 2010 12:33 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000605090900040001000302
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Maxime,

If I understand correctly, this is more of an EMF question than it is an
M2T question, I added the emf newsgroup to the to: list of this answer.

Laurent Goubet
Obeo

Maxime Lecourt wrote:
> Hi,
>
> I made a metamodel, where Items is my container EClass.
>
> part of the metamodel :
> <?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="hla"
> nsURI="http://hla/1.0" nsPrefix="hla">
> <eClassifiers xsi:type="ecore:EClass" name="Items">
> <eStructuralFeatures xsi:type="ecore:EReference" name="entities"
> upperBound="-1"
> eType="#//HEntity" derived="true" containment="true"/>
> </eClassifiers>
>
> So after that I wanted to define a model
> <?xml version="1.0" encoding="UTF-8"?>
> <hla:Items xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:metamodel="http://www.example.org/metamodel"
> xsi:schemaLocation="http://www.example.org/metamodel metamodel/hla.ecore">
> </hla:Items>
>
>
> But I get "Class 'Items' is not found or is abstract". The most
> surprising is that it worked for a while.


--------------000605090900040001000302
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------000605090900040001000302--
Re: In my model, Class not found or is abstract [message #540852 is a reply to message #540819] Thu, 17 June 2010 13:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
I see the package's nsURI is "http://hla/1.0" but I don't see an xmlns
declaration for that (so the XML looks invalid) nor any other use of the
package's namespace (so the instance doesn't conform to the model).

Laurent Goubet wrote:
> Hi Maxime,
>
> If I understand correctly, this is more of an EMF question than it is
> an M2T question, I added the emf newsgroup to the to: list of this
> answer.
>
> Laurent Goubet
> Obeo
>
> Maxime Lecourt wrote:
>> Hi,
>>
>> I made a metamodel, where Items is my container EClass.
>>
>> part of the metamodel :
>> <?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="hla"
>> nsURI="http://hla/1.0" nsPrefix="hla">
>> <eClassifiers xsi:type="ecore:EClass" name="Items">
>> <eStructuralFeatures xsi:type="ecore:EReference" name="entities"
>> upperBound="-1"
>> eType="#//HEntity" derived="true" containment="true"/>
>> </eClassifiers>
>>
>> So after that I wanted to define a model
>> <?xml version="1.0" encoding="UTF-8"?>
>> <hla:Items xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:metamodel="http://www.example.org/metamodel"
>> xsi:schemaLocation="http://www.example.org/metamodel
>> metamodel/hla.ecore">
>> </hla:Items>
>>
>>
>> But I get "Class 'Items' is not found or is abstract". The most
>> surprising is that it worked for a while.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: In my model, Class not found or is abstract [message #540859 is a reply to message #540786] Thu, 17 June 2010 13:50 Go to previous messageGo to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
I didn't find any tutorial or documentation regarding how to define a model (didn't know what to search for), do you know where I could find some ?

Until now I've been going by trial and error Embarrassed


One day I shall master M2T, but that day has yet to come...
Re: In my model, Class not found or is abstract [message #540875 is a reply to message #540859] Thu, 17 June 2010 14:18 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010004070206060007020802
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Maxime, please respond on the EMF forum (your thread is there :
http://www.eclipse.org/forums/index.php?t=msg&th=170220 ) as I don't
know if Ed monitors the M2T forum.

Maxime Lecourt wrote:
> I didn't find any tutorial or documentation regarding how to define a
> model (didn't know what to search for), do you know where I could find
> some ?
>
> Until now I've been going by trial and error :blush:


--------------010004070206060007020802
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------010004070206060007020802--
Re: In my model, Class not found or is abstract [message #540877 is a reply to message #540786] Thu, 17 June 2010 14:22 Go to previous message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
Thanks, just did it.

One day I shall master M2T, but that day has yet to come...
Previous Topic:[Xpand]duplication problem in html report
Next Topic:[Acceleo] Launching a module from Java
Goto Forum:
  


Current Time: Thu Apr 25 07:38:00 GMT 2024

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

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

Back to the top